tar -xvf parallel-netcdf-1.9.0.tar.bz
cd parallel-netcdf-1.9.0
export CC=clang export CXX=clang++ export FC=flang export MPICC=mpicc export MPICXX=mpicxx export MPIFC=mpifort
添加之后,后续安装可以不再重复添加。
./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=$MPIFC F77=$MPIFC make make install
export PATH=/path/to/PNETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/PNETCDF/lib:$LD_LIBRARY_PATH