Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be possible to run simulations concurrently from R #945

Closed
abdelr opened this issue Apr 7, 2021 · 1 comment · Fixed by #946
Closed

It should be possible to run simulations concurrently from R #945

abdelr opened this issue Apr 7, 2021 · 1 comment · Fixed by #946
Assignees

Comments

@abdelr
Copy link
Member

abdelr commented Apr 7, 2021

SimulationRunner should accept a list of simulations and run them concurrently.
SimulationBatch should accept a list of SimulationBatchRunValues and run them concurrently

@abdelr abdelr linked a pull request Apr 8, 2021 that will close this issue
@abdelr
Copy link
Member Author

abdelr commented Apr 16, 2021

Changes to the original implementation:

  1. Adding ConcurrencyManager class
    • This class should handle all concurrency in a way that you could specify what code to run over which data list on how many cores.
    • It should never create more threads than cores.
    • It should never create more threads than data elements.
    • Every thread should work for as long as there is still data to consume. The data is consume from a ConcurrentList. When a thread finishes processing a piece of data, it will try to take the new piece of data so if one thread needs longer to execute the other threads should take over instead of bein idle.
    • When the class is stable, PopulationRunner (or any further class in need of concurrency) should not handle the concurrency on its own but rather use this class.
  2. Adding ConcurrentSimulationRunner class
    • The class should allow for setting the amount of cores to use (0 or negative means use maximum possible).
    • It should also allow for adding a Simulation object.
    • It should allow for adding a SimulationBatch object.
    • It should allow to run concurrently all added tasks (running a Simulation or SimulationBatch).

@abdelr abdelr self-assigned this Apr 16, 2021
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 a pull request may close this issue.

1 participant