Python “print” not working when embedded into MPI program
问题 I have an Python 3 interpreter embedded into an C++ MPI application. This application loads a script and passes it to the interpreter. When I execute the program on 1 process without the MPI launcher (simply calling ./myprogram), the script is executed properly and its "print" statements output to the terminal. When the script has an error, I print it on the C++ side using PyErr_Print(). However when I lauch the program through mpirun (even on a single process), I don't get any output from