If you want to distribute one code (with one input) over multiple processors, you can use mpirun -n 2 python3 program.py
to run the program on two processors.
If you would like to run the same code, with different inputs, you can use concurrent.futures.
2 Likes