ioapi 3.2安装
官网下载tar -zxvf ioapi-3.2-20200828.tar.gzcd ioapi-3.2-20200828export BIN=Linux2_x86_64ifortexport BASEDIR=/$home/ioapiexport INSTALL=/$home/ioapi_install
·
设置环境变量
系统为Linux2_x86_64ifort,nocpl
tar -zxvf ioapi-3.2.tar.gz
cd ioapi-3.2
export BIN=Linux2_x86_64ifort
mkdir $BIN
编译Makefile
cp Makefile.template Makefile
vi Makefile.template
BIN = Linux2_x86_64ifort
INSTALL = (安装目录),如果设置成${PWD}的话也报错了
VERSION = 3.2-${CPLMODE}
BASEDIR = ${PWD}
NCFLIBS = -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz # netcdf-4 with HDF but not DAP
IOAPIDEFS = "-DIOAPI_NCF4"
LIBINST = $(INSTALL)/$(BIN)
BININST = $(INSTALL)/$(BIN)
CPLMODE = nocpl
IOAPIDEFS =
PVMINCL =
IODIR = $(BASEDIR)/ioapi
FIXDIR = $(IODIR)/fixed_src
HTMLDIR = $(BASEDIR)/HTML
TOOLDIR = $(BASEDIR)/m3tools
OBJDIR = $(BASEDIR)/$(BIN)
对/ioapi 和/m3tools 都cp Makefile.nocpl Makefile
vi Makeinclude.Linux2_x86_64ifort
ARCHFLAGS = \
-DIOAPI_NCF4=1 \
-DAUTO_ARRAYS=1 \
-DF90=1 -DFLDMN=1 \
-DFSTR_L=int \
-DIOAPI_NO_STDOUT=1 \
-DAVOID_FLUSH=1 -DBIT32=1
-DIOAPI_NCF4=1 :
Turns on netCDF-4 INTEGER*8 operations, and requires HDF-enabled netCDF-4 libraries, instead of netCDF-3 (for the rest of your Makefiles).
Required if your netCDF library is built without the recommended --disable-netcdf-4
此外根据intel的版本,19以上必须做以下更改
OMPFLAGS = -qopenmp
OMPLIBS = -qopenmp
其他设置
cd $BIN
ln -sf $NETLIB libnetcdff.a ./
ln -sf $NETLIB libnetcdf.a ./
安装
make configure
make
make install
ln -sf /ioapi_install/Linux2_x86_64ifort/* ./
报错:
make[1]: *** [airs2m3] Error 1
解决方法:重新编译netcdf,configure时添加–disable-netcdf-4 --disable-dap
更多推荐
已为社区贡献1条内容
所有评论(0)