我要评分
获取效率
正确性
完整性
易理解

Installing NetCDF-C

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following commands to decompress the NetCDF-C installation package:
    tar -xvf netcdf-c-4.4.1.1.tar.gz
  3. Run the following command to switch to the directory generated after the package is decompressed:
    cd netcdf-c-4.4.1.1
  4. Run the following command to perform configuration:
    export MPICC=`which mpicc`
    export MPICXX=`which mpicxx`
    export MPIFC=`which mpifort`
    export CPPFLAGS="-I/path/to/HDF5/include -I/path/to/PNETCDF/include"
    export LDFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -Wl,-rpath=/path/to/HDF5/install/lib"
    export CFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -I/path/to/HDF5/include -I/path/to/PNETCDF/include"
    ./configure --prefix=/path/to/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-pnetcdf --enable-largefile CC=$MPICC CXX=$MPICXX FC=$MPIFC F77=$MPIFC
  5. Run the following commands to perform compilation and installation:
    make -j 16
    make install
  6. Run the following commands to load environment variables:
    export PATH=/path/to/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH