ACENET Summer School - MPI

mpicc, mpif90, and mpirun

Overview

Teaching: 5 min
Exercises: 0 min
Questions
Objectives

What mpicc/ mpif90 do

$ mpicc --showme hello-world.c -o hello-world

gcc -I/usr/local/openmpi.gcc-1.2.9/include 
  -pthread hello.c -o hello-c 
  -L/usr/local/openmpi.gcc-1.2.9/lib
  -lmpi -lopen-rte -lopen-pal -ldl 
   -Wl,--export-dynamic -lnsl -lutil -lm -ldl

What mpirun does

What mpirun does

Number of Processes

$ mpirun -np 24 hello-world

mpirun runs any program

$ hostname  
$ mpirun -np 4 hostname  
$ ls
$ mpirun -np 4 ls

Key Points