Hello all,
I am wondering if there is a straightforward way in SCOOP to ensure that each process only completes one task before being killed and a new process spawning in its place. I am working on a genetic algorithm, in which each individual in the population is evaluated on a separate process. Each of those evaluations takes a significant amount of memory (due to a memory leak that unfortunately cannot be addressed at present), so I want to ensure that workers are not reused when I move from one generation to the next. Instead, I want to kill and restart all processes during the transition to the next generation. I previously used the multiprocessing package, where this was a straightforward fix:
pool = multiprocessing.Pool(processes, maxtasksperchild=1)
So far it looks like I need play with adding calls to ScoopApp.close and ScoopApp.run at each generation, but if anyone has any insight or suggestions, that would be much appreciated.
Cheers,
Kate