WRF > Open MPI / MPICH > MPICHでWRFコンパイル失敗 > 解決
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
WRFのビルド
を参考に以下の2つの動作を比較しようとしていた。
- Open MPI
- MPICH
module loadでそれぞれ対応するモジュールを読込み、コンパイルをしていたのだが、Open MPIではwrf.exeなどのビルドに成功する一方、MPICHではビルドが失敗した。
==========================================================================
build started: Thu Sep 29 03:07:55 JST 2016
build completed: Thu Sep 29 03:07:58 JST 2016
---> Problems building executables, look for errors in the build log <---
何が問題だろうか。
以下を試した。
(Open MPIの設定で)
$ ./compile em_real >& log.comp_openmpi
(MPICHの設定で)
$ ./compile em_real >& log.comp_mpich
そしてその差分を取ると
$ diff log.comp_openmpi log.comp_mpich
40c40
< /usr/lib64/openmpi/bin/mpif90
---
> /usr/lib64/mpich/bin/mpif90
45c45
< /usr/lib64/openmpi/bin/mpicc
---
> /usr/lib64/mpich/bin/mpicc
176,179c176,177
< f951: error: unrecognized command line option "-f90=gfortran"
< 0.00user 0.00system 0:00.00elapsed 50%CPU (0avgtext+0avgdata 1852maxresident)k
< 0inputs+0outputs (0major+1270minor)pagefaults 0swaps
< make[2]: [diffwrf] Error 1 (ignored)
---
> 0.30user 0.03system 0:00.33elapsed 102%CPU (0avgtext+0avgdata 24420maxresident)k
> 0inputs+160outputs (0major+13257minor)pagefaults 0swaps
378,380c376,378
< real 0m0.089s
< user 0m0.061s
< sys 0m0.027s
---
> real 0m0.118s
...
MPICHの場合176行目にf951: error: unrecognized command line option "-f90=gfortran"
というエラーが出ている。
176行目は
time mpif90 -f90=gfortran -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -c -I/usr/include -I../ioapi_share diffwrf.f
mpif90のオプションとして"-f90="がないとなっている。
MPICHのドキュメント
-f90=name
Use compiler name instead of the default choice. Use this only if the compiler is compatible with the MPICH library (see below)Compatible Compilers
The MPI library may be used with any compiler that uses the same lengths for basic data objects (such as long double) and that uses compatible run-time libraries. On many systems, the various compilers are compatible and may be used interchangably. There are exceptions; if you use the MPICH_F90 environment variable or the -f90=name command-line argument to override the choice of compiler and encounter problems, try reconfiguring MPICH with the new compiler and installing MPICH in a separate location. See the installation manual for more details.
yumでmpichをインストールするだけではだめなのだろうか。
diffの見直し
http://qiita.com/7of9/items/d932df7957957125dea7
で確認したところ、f951: error: unrecognized command line option "-f90=gfortran"
はOpenMPIの方で出ていた。
やり直し
WRFV3のtar.gzから再度作り直したところ、コンパイルできた。
CFLAGS_LOCAL = -w -O3 -c
を
CFLAGS_LOCAL = -w -O2 -c
で再度ビルド.
を忘れていた可能性もある。
Author And Source
この問題について(WRF > Open MPI / MPICH > MPICHでWRFコンパイル失敗 > 解決), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/cf99212b42ea64e8dbf0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .