Hello!
I'm trying to fit a simple gaussian model to some data using emcee while utilizing parallel processing. I am using multiprocess instead of multiprocessing as I am working in Jupyter notebook where multiprocessing often runs into problems for some reason. For example, I was able to substitute multiprocess for multiprocessing in the parallelization example of emcee's website and it worker perfectly. Currently, the gaussian code is saying that one of my functions is not defined even though it was defined earlier. This same issue occurred for a much more complicated model I am working on. Not sure why it isn't being carried over once the parallelization starts. Specifically the error occurs on the very last line saying that "log_prior" is not defined. The author of Multiprocess, Mike McKerns, reviewed the problem and stated "I see that the pool's map function is not being called within the __main__ block, emcee is calling it somewhere in that code." and suggested I reach out here at emcee for a possible solution. The code can be found attached. Any suggestions on how to fix this issue would be much appreciated!