Stdout from every process is gathered by mpirun and shown on in stdout of the shell where mpirun started. There's a command line option for mpirun to label lines by the MPI task, "--tag-output" I think. There's some OpenMP function you can use to determine the current OpenMP thread number which you could add to the print statement.
Re: [OMPI users] Printing in a fortran MPI/OpenMP environment
Bernstein, Noam CIV USN NRL (6393) Washington DC (USA) via users Tue, 31 Jan 2023 17:08:24 -0800
- [OMPI use... Vahid Askarpour via users