MPI hello world in C

From ScientificComputing
Revision as of 21:46, 26 November 2020 by Jarunanp (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Load modules

We will use the new software stack in this tutorial:

 $ env2lmod  
 $ module load gcc/6.3.0 openmpi
 The following have been reloaded with a version change:
   1) gcc/4.8.5 => gcc/6.3.0
 $ which mpirun

Compile MPI Hello World

 $ gcc ... mpi_hello_world.cpp

Submit a batch job

Submit a job to the compute node

 $ bsub -n 18 -W 01:00 mpirun mpi_hello_world.

Check the job status

 $ bjobs


 $ bbjobs