export PATH=/path/to/GNU/bin:/path/to/OPENMPI/bin:$PATH export LD_LIBRARY_PATH=/path/to/GNU/lib64:/path/to/OPENMPI/lib:$LD_LIBRARY_PATH tar -xvf parallel-netcdf-1.9.0.tar.bz2 cd parallel-netcdf-1.9.0 mkdir -p /path/to/PNETCDF ./configure --prefix=/path/to/PNETCDF --build=aarch64-unknown-linux-gnu CFLAGS="-fPIC -DPIC" CXXFLAGS="-fPIC -DPIC" FCFLAGS="-fPIC" FFLAGS="-fPIC" CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort make -j 16 make install
如果此前已经声明过编译器和MPI的环境变量,本步骤前两条声明环境变量的命令可省略。
cd /path/to/PNETCDF ls lib
回显如下图,表明安装成功。