scottransom / presto

Open source pulsar search and analysis toolkit
http://www.cv.nrao.edu/~sransom/presto/
GNU General Public License v2.0
239 stars 177 forks source link

prepfold is not multiprocessing safe #49

Closed paulray closed 9 years ago

paulray commented 9 years ago

It would be nice to be able to run many instances of prepfold at the same time, e.g. using multiprocessing.Pool() in Python. However, this is not safe and ends up crashing because the polycos that are generated by each instance stomp on each other. It would be nice if unique tempfiles were used to prevent this from happening.

scottransom commented 9 years ago

yeah.... this has been on the ToDo list forever.... Pull-requests welcome! (I even think that fold_psrfits does this correctly, so we could probably just steal the code from there...)

scottransom commented 9 years ago

I just implemented and pushed this up as well. Should be good... But testing with your script would be excellent, @paulray