Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-C

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to install the dependency:
    yum install curl libcurl libcurl-devel -y
  3. Run the following commands to load the compiler and Open MPI. If the commands have been run, skip this step.
    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
  4. Run the following commands to decompress the NetCDF-C installation package:
    tar zxvf netcdf-c-4.7.0.tar.gz
    yum install curl.aarch64 libcurl.aarch64 libcurl-devel.aarch64 -y
  5. Run the following command to go to the directory generated after the decompression:
    cd netcdf-c-4.7.0
  6. Run the following command to perform configuration:
    export MPICC=mpicc
    export MPICXX=mpicxx
    export MPIFC=mpifort
    ./configure --prefix=$NETCDF --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-pnetcdf --enable-largefile CPPFLAGS=" -I${HDF5}/include -I${PNETCDF}/include" LDFLAGS=" -L${HDF5}/lib -L${PNETCDF}/lib -Wl,-rpath=${HDF5}/lib -Wl,-rpath=${PNETCDF}/lib " CFLAGS=" -L${HDF5}/lib -L${PNETCDF}/lib -I${HDF5}/include -I${PNETCDF}/include " CC=$MPICC CXX=$MPICXX FC=$MPIFC F77=$MPIFC
  7. Run the following commands to perform the compilation and installation:
    make -j 16
    make install
  8. 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