Skip to content

Parallelisation with Future - #634

Open
janaobsteter wants to merge 145 commits into
HighlanderLab:develfrom
janaobsteter:Future
Open

janaobsteter wants to merge 145 commits into
HighlanderLab:develfrom
janaobsteter:Future

Conversation

@janaobsteter

Copy link
Copy Markdown
Collaborator

No description provided.

Renaming to enable swtich from non-parallel to parallel
Changing removeQueen to not include nTHreads
Setting nThreads = 1 before creating individuals
gregorgorjanc and others added 30 commits October 3, 2026 17:13
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
Refine variance mappings, colony indexing, and brood summaries

Merging this in and then applying some of the comments to get the variance components corrections into the Future version
…rsede

createPrevailingVirginQueens_internal() now also takes a Colony, which is
done in the main session without futures; the per-colony work is in
createPrevailingVirginQueen_internal(). swarm() and supersede() use it for
Colony and MultiColony, so all created virgin queens (including csd
homozygous ones) are recorded as virgin queens for a Colony too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createPrevailingVirginQueens_internal() now does the work for a Colony and,
for a MultiColony, calls itself on each colony (with only the queen) on the
parallel workers via future_mapply(); given ids, it returns the records
instead of adding them to simParamBee. Seeded results are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createCastePop(), pullCastePop(), and removeCastePop() on a MultiColony now
send colonies to parallel workers with future_mapply(), which has much less
overhead than future_lapply() with plan(multisession) (buildUp() 14.5 -> 7 s,
removeWorkers() 10.5 -> 2.2 s with 1000 colonies and 4 workers). Seeded
results are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- createCrossPlan() returns one drone producing colony ID per drone;
  cross() uses colony cross plans as given (one entry = one father)
- New nDPC and DPCAllocation ("random"/"nearest") in createCrossPlan()
  and cross(); spatial plans include all colonies in the radius
  (no longer capped at 10 by RANN::nn2)
- nDrones is evaluated once, in createCrossPlan(); NULL falls back to
  SimParamBee$nFathers; non-whole values stop
- Fix cross() giving 0 fathers when all sampled colonies produce the
  same number of drones (sapply matrix simplification)
- Fix drone cross plans assigned in sorted rather than queen order
- Fix getFathers(<MultiColony>, collapse = TRUE) merging twice
- Tests for nDPC/DPCAllocation and given plans; fix L1 test parse error
  and character colony IDs in tests; update D_Crossing vignette and NEWS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants