| Using the MOAB Workload Manager - MOAB OpenMPI Job |
|
Page 7 of 10
Example 4: Submitting OpenMPI jobsOpenMPI is more flexible than mvapich 2 with the nodes file and can directly use the PBS_NODEFILE given by the job scheduler. The setup of the GNU version of OpenMPI is described here. Before we compile our example program, we have to make sure that we run the right compiler: $ module load gnu-openmpi We can then compile our trap.c file like: mpicc -o trap-openmpi trap.c to obtain the OpenMPI executable trap-openmpi. This can now be run with the MOAB script below: #!/bin/bash Save the moab script as trap-openmpi.sh. Submit the job to MOAB using: $ msub trap-openmpi.sh Once the job has completed, you should receive an output file: TRAP-OPENMPI.o which looks like: Number of procs 4 With n = 1024 trapezoids, This example was done using the gcc version of OpenMPI. There is also a version of Intel OpenMPI available. The setup of OpenMPI Intel is described here. |



