Skip to content

Explore using foreach/doParallel and OpenMP jointly #615

@gregorgorjanc

Description

@gregorgorjanc

Current work with Parallelisation at https://github.com/HighlanderLab/SIMplyBee/tree/Parallelisation is using SP$nThreads to use both OpenMP and foreach/doParallel "jointly", but the way the code is written for population / colony work we use OpenMP, while for multi-colony we use foreach/doParallel.

We should also check if we could have SP$nThreads for OpenMP (like in AlphaSimR) and, SP$nThreadsMultiColony (might need a better name), so that we could leverage both - say with 10 cores, we could set SP$nThreads <- 2 and SP$nThreadsMultiColony <- 5 and get 5 sub-processes working across colonies via foreach/doParallel, each running with 2 cores via OpenMP.

The question is if this would actually be possible!

The code change would not be large - we would just need to work with SP$nThreadsMultiColony in https://github.com/HighlanderLab/SIMplyBee/tree/Parallelisation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions