I have two python scripts, script A and script B. My environment is Linux with the CPython implementation.
At some point in script A use Process from multiprocessing to start multiple processes using the normal p.start()
and p.join()
procedure.
Script B calls script A in the following way:
subprocess.call(["python", "script_A.py"])
When I run script A by itself, it uses all the cores that I ask it to use.
When I run script A from script B, only one core is used, no matter what. How can I call script A from script B and have it use all the cores that I ask it to use?