Repository navigation
Parallelisation with Future - #634
Open
janaobsteter wants to merge 145 commits into
Open
janaobsteter wants to merge 145 commits into
janaobsteter wants to merge 145 commits into
Conversation
Version 0.4.0 of SIMplyBee
Changing vignette D
Renaming to enable swtich from non-parallel to parallel
Parallelisation - correcting NAMESPACE
Changing removeQueen to not include nTHreads
Removing non-parallel versions
Addding nThreads
Solving nThreads inconsistencies
Setting nThreads = 1 before creating individuals
Removing print statements
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
…yBee_fork into future-reduce-globals
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>
Claude parallelisation optimisation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.