Overview
Teaching: 5 min
Exercises: 0 minQuestions
Objectives
$ 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
gcc hello.world.c -o hello-world
(or whatever the appropriate compiler is - gfortran, icc, pgf90, etc) with a number of options (-I, -L, -l) to make sure right libraries, headers are available.$ mpirun -np 24 hello-world
$ hostname
$ mpirun -np 4 hostname
$ ls
$ mpirun -np 4 ls
Key Points