公式にインストールの方法が書かれているので殊更に細かく書く必要はないと思うし書かないが、詰まって半日使う羽目になったのでその部分だけメモ。
結論から言うとintelのコンパイラが新しくなった影響で、諸々のwarningがerrorになったせいで通らなかったようです。
インストールのコマンド自体はmake
してmake install
するだけですが、makefile
のオプションが曲者です。
今回は産総研のABCI上でコンパイルするのでmklとかfftw3の場所が特殊ですが、適宜読み替えてください。
makefile
MKLROOT = /apps/intel/2023.0/mkl/2023.0.0
CC = mpicc -O3 -xHOST -qopenmp -I/apps/intel/2023.0/mkl/2023.0.0/include/fftw/ -I${MKLROOT}/include -Wno-implicit-function-declaration -fcommon
FC = mpiifort -O3 -xHOST -no-prec-div -qopenmp
LIB= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl -lifcore
問題なのはCCの部分で-Wno-implicit-function-declaration
と-fcommon
を追加しています。
まず-Wno-implicit-function-declaration
ですが、これは暗黙の関数宣言を認めるというオプションになっています。昔からwarningは出ていたと思うのですが、それがerrorになったのでこのオプションをつけないと
ISO C99 and later do not support implicit function declarations
的な出力が出ます。
次に-fcommon
ですが、詳しくは知らないので他の記事を見ていただくとして、やはりC言語周りの変更の影響のようです。これも入れないと
multiple definition of ~~~
という感じの出力が大量に (数万行) 出ます。
南無三。