Closed KarlTjensvoll closed 6 years ago
One fix is to use the syntax:
if __name__ == '__main__':
YOUR_SCRIPT()
This fix is explained in detail here. If you want to learn more about the deeper difference you can read more about that here.
To get consistent behavior I recommend using the module ipyparalllel
but it is somewhat more difficult to apply.
I can use Pool to paralellize my work on my macbook, but when I try on my more powerful Windows to run the code faster, it does not work. None of the cores start doing any work and for a sample of a 100 I let it run for 10 minutes, but nothing happens.
So I use this code:
and then run: