按“i”进入编辑模式,编写“env.sh”文件。#!/bin/bash
export GNU_HOME=/path/to/GNU
export MPI_HOME=/path/to/OPENMPI
export HDF5=/path/to/HDF5
export PNETCDF=/path/to/PNETCDF
export NETCDF=/path/to/NETCDF
export PHDF5=$HDF5
export CPPFLAGS=" -I$HDF5/include -I$PNETCDF/include -I$NETCDF/include -I$MPI_HOME/include "
export CFLAGS=" -I$HDF5/include -I$PNETCDF/include -I$NETCDF/include -I$MPI_HOME/include "
export CXXFLAGS=" -I$HDF5/include -I$PNETCDF/include -I$NETCDF/include -I$MPI_HOME/include "
export FCFLAGS=" -I$HDF5/include -I$PNETCDF/include"
export FFLAGS=" -I$HDF5/include -I$PNETCDF/include"
export LDFLAGS=" -L$HDF5/lib -L$PNETCDF/lib -L$NETCDF/lib"
export LD_LIBRARY_PATH=$HDF5/lib:$PNETCDF/lib:$NETCDF/lib:$MPI_HOME/lib: $GNU_HOME/lib64:$LD_LIBRARY_PATH
export PATH=$NETCDF/bin:$PNETCDF/bin:$MPI_HOME/bin:$GNU_HOME/bin:$PATH