Command-line arguments for the application program


Up: Debugging MPI programs with built-in tools Next: Starting jobs with a debugger Previous: Setting the Working Directory for the p4 Device

Arguments on the command line that follow the application program name and are not directed to the mpich system (don't begin with -mpi or -p4) are passed through to all processes of the application program. For example, if you execute

    mpirun -echo -np 4 myprog -mpiversion -p4dbg 10 x y z 

then -echo -np 4 is interpreted by mpirun (echo actions of mpirun and run four processes), -mpiversion is interpreted by mpich (each process prints configuration information), -p4dbg 10 is interpreted by the p4 device if your version was configured with -device=ch_p4 (sets p4 debugging level to 10), and x y z are passed through to the application program. In addition, MPI_Init strips out non-application arguments, so that after the call to MPI_Init in your C program, the argument vector argv contains only
    myprog x y z 

and your program can process its own command-line arguments in the normal way.

It is not possible to provide different command-line arguments for the different processes.



Up: Debugging MPI programs with built-in tools Next: Starting jobs with a debugger Previous: Setting the Working Directory for the p4 Device