2

I want to parallelize the execution of a for loop written in python-2.7 on the quadcore processor of my computer's CPU.

Shall I implement this with joblib.Parallel or with Parallel-Python?

I've seen joblib.Parallel being used more, but the first line of this part of its documentation worried me: it sets forked processes to work on "separate CPUs". Does that mean it can't do it on separate cores of the same CPU?

Alexandre Holden Daly
  • 6,944
  • 5
  • 25
  • 36

1 Answers1

3

joblib versus Parallel-Python is primarily opinion-based which is defined as Off-Topic for Stackoverflow. But as for the other part of your question:

By CPU, I think they are referring to core.

import joblib
print joblib.cpu_count()

Gives 8 on my computer, which is exactly the number of cores I have, and I only have one CPU.

They are also based on top of multiprocessing which states:

... the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine.

Dair
  • 15,910
  • 9
  • 62
  • 107