You can use the
-l mpirun option just for that purpose. Here is an excerpt from our Reference Manual:
Use this option to insert the MPI process rank at the beginning of all lines written to the standard output.
I'm not sure the font here is clear but this is the letter "l" (as in line), and not the number 1.
Let us know if this helps.