Compiling and executing simple MPI demo Fortran 77 program, fpi,
using the
Intel compilers
- Fortran 77 source code: fpi.f
- Makefile
Sample session trace
#
Change to some directory visible from ALL nodes
vnfe1% cd
~/matt/work
#
Copy the example directory
vnfe1% cp -r
~matt/examples/fpi-mpi-intel .
#
Change to your local copy of the examples directory
vnfe1% cd
fpi-mpi-intel
#
Build the application
vnfe1% make
/usr/local/intel/bin/mpif77 -I/usr/local/intel/include -O3 -axK
-tpp6 -c fpi.f
fpi.f(20) : (col. 14) remark: MAIN__ has been targeted for automatic
cpu dispatch.
/usr/local/intel/bin/mpif77 -O3 -axK -tpp6 -L/usr/local/intel/lib
fpi.o -o fpi
echo "Type 'run4' or 'run40' to run with 4 or 40 processors'"
Type 'run4' or 'run40' to run with 4 or 40 processors'
#
Run on 4 processors using vnrun
vnfe1% make
run4
vnrun -n 4 fpi
Will execute 'ssh vn10 cd /d/vnfe1/home/matt/work/fpi-mpi-intel; time
mpirun -np 4 -machinefile mfile -n 4 fpi'
Will use the following machine file
vn11
vn12
vn13
Process
0
of
4 is alive
Process
1
of
4 is alive
Process
2
of
4 is alive
Process
3
of
4 is alive
pi is approximately: 3.1415926539002341 Error is:
0.0000000003104410
0.338u 0.360s 0:02.16 31.9% 0+0k 0+0io 3pf+0w