動作環境
Xeon E5-2620 v4 (8コア) x 2
32GB RAM
CentOS 6.8 (64bit)
openmpi-1.8.x86_64 とその-devel
mpich.x86_64 3.1-5.el6とその-devel
関連 http://qiita.com/7of9/items/cf99212b42ea64e8dbf0
MPICH使用時にmpif90の-f90=gfortran
オプションでエラーが出ている件に関して。
http://people.sc.fsu.edu/~jburkardt/f_src/mpi/mpi.html
にあるFortran90用サンプルを試した。
OpenMPIで実行
とりあえず正常動作するOpenMPIの方で試した。
$ module purge
$ module load openmpi-x86_64
$ source ~/use_openmpi
$ mpif90 -f90=gfortran hello_mpi.f90
f951: error: unrecognized command line option "-f90=gfortran"
Open MPIの方でも上記エラーが出た。
以下だと動いた。
$ mpif90 hello_mpi.f90
$ mpirun -np 3 ./a.out
HELLO_MPI - Master process:
FORTRAN90/MPI version
An MPI test program.
The number of processes is 3
Process 0 says "Hello, world!"
HELLO_MPI - Master process:
Normal end of execution: "Goodbye, world!".
Elapsed wall clock time = 0.610352E-04 seconds.
Process 1 says "Hello, world!"
Process 2 says "Hello, world!"
MPICHでコンパイル
$ module purge
$ module load mpich-x86_64
$ source ~/use_mpich
$ mpif90 -f90=gfortran hello_mpi.f90
$ mpif90 hello_mpi.f90
反対にMPICHでは-f90=gfortran
が有っても無くても正常にコンパイルできた。
diffの見方を間違っていた。