I am a former Matlab-only user who is self-learning Python. I am now at the point where I am learning how to use Python's parallel processing. Matlab's parallel programming is performed, for the most part, primarily with a single command: parfor
. Simple.
There seems to be many more options available in Python than in Matlab. It is overwhelming. For instance, in the multiprocessing
package, I find the Pool
and the Process
classes, and each allows for several arguments and options.
Given that I am new to python, and that I am self-teaching myself, would someone take a few minutes to explain the big-picture difference between Pool
and Process
? When is it more appropriate to use Pool
vs. Process
?
For context: my current programming work requires me to parallelize a function that outputs a vector of data. This function accepts several arguments, but is essentially a for-loop that I would like to run in parallel.
Many thanks for your help!