- 执行以下命令下载pnetcdf安装包。
cd /path/to/pnetcdf
wget http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/pnetcdf-1.12.1.tar.gz
- 执行以下命令解压安装包。
tar xf pnetcdf-1.12.1.tar.gz
cd pnetcdf-1.12.1
- 执行以下命令生成makefile。
CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif90 ./configure --prefix=/path/to/pnetcdf --build=aarch64-unknown-linux-gnu --enable-shared --enable-fortran --enable-large-file-test
- 执行以下命令编译安装。
make -j
make install
- 执行以下命令设置环境变量。
export PNETCDF_PATH=/path/to/pnetcdf
export PATH=${PNETCDF_PATH}/bin:$PATH
export LD_LIBRARY_PATH=${PNETCDF_PATH}/lib:$LD_LIBRARY_PATH
export INCLUDE=${PNETCDF_PATH}/include:$INCLUDE