soravux / scoop

SCOOP (Scalable COncurrent Operations in Python)
https://github.com/soravux/scoop
GNU Lesser General Public License v3.0
625 stars 88 forks source link

How to wait for the finish of subprocess.run (["./executer"]) when lunched by SCOOP? #84

Open esiwgnahz opened 4 years ago

esiwgnahz commented 4 years ago

I am trying to using SCOOP and DEAP for the optimization of a FEA model. In python the model is run by subprocess.run (["./executer"]) . Using python's multiprocess.pool way, I can successfully run the external executor using subprocess.run. But when lunched by SCOOP, the subprocess.run soon skipped without waiting for the modeling result though I can see the external executor was running on the background. There is no error information while running. Please tell me how to solve this? Thank you!

pphilippos commented 2 years ago

Hello, I think I had a similar problem with new scoop map calls not been waited for their result. But it was my mistake because I didn't make explicit that I wanted the results (since it is from an external application in my case, a subprocess in yours). One way to do this is to cast the map generator to a list, i.e. list(..map(...)) (I forgot where I first read this online). But I am not sure this is the exaact problem you are having.