avoid multiprocessing when simulating only one Task #2680
RamiALBASHA
started this conversation in
Ideas
Replies: 2 comments 2 replies
|
Hi Rami, |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
RuFaS currently instantiates a
multiprocessing.Poolfor running the simulationTasks, regardless of the number of the latter. In the case of running only oneTask, usingmultiprocessing.Poolis not necessary and can be replaced by a sequential calculation. This replacement is beneficial for users who deploy the code to AWS Lambda services (like our team) where multiprocessing with Pool is not supported.This feature can be performed with minimal modifications to the code, by:
self.pooltoNoneif the number of workers is 1 (here):We have implemented these modifications to our fork and wanted to share the info for the benefit of other users.
All reactions