Usually MPI programs are run by submitting a batch job. However if you want to run MPI jobs interactively, for example to debug or test MPI programs, you can request an interactive session to do that.
How to run MPI jobs in an interactive session
To start an interactive MPI session, use qrsh command with
scc % qrsh -pe mpi_16_tasks_per_node 32
When you submit your interactive job it will wait in the queue until the resources you requested are available. Depending on how busy the SCC is, you may need to wait more than a couple minutes. Interactive jobs by default assume you are only willing to wait for 15 minutes for them to start; if you are willing to wait longer you can use -now n option to make your job waiting in the queue until the requested resources are available:
scc % qrsh -pe mpi_16_tasks_per_node 32 -now n
In an interactive session, necessary MPI environment variables have been set by the system, so you can run an MPI program with mpirun, simply specifying the total number of MPI tasks with the flag -np (or -n):
scc-ha1 % mpirun -np 32 ./your_mpi_binary
Note that the host file required to run an MPI program on multiple nodes is automatically handled by the system and you do not need to explicitly provide the host file for mpirun.
Please refer to this page for MPI programming and examples.
For further questions on running MPI jobs in an interactive session, please contact us at email@example.com .