This page explains how to perform inter-node parallel processing (distributed memory parallel processing) using Open MPI on OCTOPUS.
Compilation Method
$ module load BaseGCC
$ mpif90 [options] source_file (For Fortran,)
$ mpicc [options] source_file (For C,)
$ mpic++ [options] source_file (For C++,)
Execution Script
The command to execute MPI is as follows:
mpirun ${NQSV_MPIOPTS} -np (total parallel number) executable_name
An example script for executing an MPI batch request with a duration of 1 hour, running in parallel across 4 nodes, with 256 parallel executions per node (totaling 1,024 parallel executions), is as follows:
|
1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/bash #PBS -q OCT #PBS --group=[Group Name] #PBS -l elapstim_req=1:00:00 #PBS -T openmpi #PBS -b 4 cd $PBS_O_WORKDIR module load BaseGCC # MPI execution mpirun ${NQSV_MPIOPTS} -np 1024 -npernode 256 ./a.out |
Points to Note for Multi-Node Execution
-
If you specify options or environment variables in the job script with setenv (option name), they will be set only on the master node and not on the slave nodes.
If you want to reflect the settings on all nodes, please specify #PBS -v (option name).
For more details, please refer to the following:
How to Write a Job Script - Specifying Environment Variables

