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

Installing NetCDF-C

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the NetCDF-C installation package.
    tar -zxvf netcdf-c-4.7.4.tar.gz
  3. Go to the directory generated after the decompression.
    cd netcdf-c-4.7.4
    export CPPFLAGS="-I/path/to/HDF5/include -I/path/to/PNETCDF/include -I/path/to/CURL/include"
    export LDFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -L/path/to/CURL/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/PNETCDF/lib -Wl,-rpath=/path/to/CURL/lib"
    export CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-null-conversion"
  4. Perform the configuration.
    ./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=mpifort F77=mpifort F90=mpifort
  5. Perform the compilation and installation.
    make -j 64
    make install
  6. Load the environment variables.
    export PATH=/path/to/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH