ビルドの手順
システムに gfortran, MPI ライブラリがインストールされていることを前提とします.
インストール先は /work01/sugiyama/usr/local/ としている. 適宜読み替えてほしい.
NetCDF のインストール
環境変数の設定
$ export FC=gfortran $ export CC=gcc $ export CPP= $ exporrt CXX=g++
HDF のインストール
<URL:https://www.hdfgroup.org/downloads/hdf5> から hdf5 をダウンロードし,インストールする.
$ tar zxvf hdf5-1.12.0.tar.gz $ cd hdf5-1.12.0/ $ ./configure --prefix=/work01/sugiyama/usr/local --enable-fortran $ make $ make install
NetCDF ver.4
<URL:https://www.unidata.ucar.edu/software/netcdf/> から, netcdf-c と netcdf-fortran をダウンロードし,インストールする.
$ wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz $ wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.5.3.tar.gz $ export LDFLAGS=-L/work01/sugiyama/usr/local/lib $ export CPPFLAGS=-I/work01/sugiyama/usr/local/include $ export LD_LIBRARY_PATH=/work01/sugiyama/usr/local/lib/:$LD_LIBRARY_PATH $ tar zxvf netcdf-c-4.7.4.tar.gz $ cd netcdf-c-4.7.4/ $ ./configure --prefix=/work01/sugiyama/usr/local --enable-netcdf-4 $ make $ make install $ tar zxvf netcdf-fortran-4.5.3.tar.gz $ cd netcdf-fortran-4.5.3/ $ ./configure --prefix=/work01/sugiyama/usr/local/ $ make $ make install
BLAS, LAPACK
<URL:http://www.netlib.org/lapack/> よりダウンロード・インストール.
$ wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz $ tar zxvf v3.9.0.tar.gz $ cd lapack-3.9.0/ $ cp INSTALL/make.inc.gfortran make.inc $ make blaslib $ make lapacklib $ make tmglib $ cp librefblas.a ~/usr/local/lib/libblas.a $ cp liblapack.a ~/usr/local/lib/ $ cp libtmglib.a ~/usr/local/lib/libtmg.a
OpenMPI
OpenMPI は ver. 5.0.8 が最新であった.それをダウンロードする.
# wget https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.8.tar.gz $ tar zxvf openmpi-5.0.8.tar.gz $ cd openmpi-5.0.8 $ lv README PBS と連携させるときは --with-tm=<directory> をつけることがわかる. $ mkdir build $ cd build $ ../configure --prefix=/home/sugiyama/usr/local/ --with-tm=/opt/pbs/ --enable-shared --enable-static --enable-mpi-interface-warning $ make -j 8 $ make install
gtool5 (MPI 対応)
<URL:http://www.gfd-dennou.org/library/gtool/gtool5/> よりダウンロード・インストール.
$ wget http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current.tgz $ tar zxvf gtool5_current.tgz $ cd gtool5-20160613/
MPI 対応でインストール (シングル版の場合は, FC=gfortran として,--enable-mpi を付けない).
$ export FC=mpifort $ SYSFFLAGS=-I/work01/sugiyama/usr/local/include/ ./configure --prefix=/work01/sugiyama/usr/local/ --with-netcdf=/work01/sugiyama/usr/local/lib/libnetcdf.a --with-netcdff=/work01/sugiyama/usr/local/lib/libnetcdff.a --enable-mpi $ make install
deepconv のインストール
configure に --with-mpi オプションのみ指定すれば良い. gt5frt は gfortran のラッパーで,netcdf や gtool などのライブラリパスが指定されている.
$ git clone https://github.com/gfd-dennou-club/Dennou-deepconv-arare6.git $ export FC=gt5frt $ ./configure --with-mpi $ make
bin 以下にバイナリが作成される.