Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-Fortran

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the NetCDF-Fortran installation package.
    tar xf netcdf-fortran-4.5.3.tar.gz
  3. Go to the directory generated after the decompression.
    cd netcdf-fortran-4.5.3
  4. Perform the configuration.
    ./configure --prefix=/path/to/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --with-pic --disable-doxygen --enable-largefile --enable-static CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort CPPFLAGS="-I/path/to/HDF5/include -I/path/to /NETCDF/include" LDFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/NETCDF/lib" CFLAGS="-fPIC -L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include" CXXFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include" FCFLAGS="-fPIC -L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include"
  5. Modify the libtool file.
    1. Open the libtool file.
      vi libtool
    2. Press i to enter the edit mode and change all wl="" to wl="-Wl,".
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Perform the compilation and installation.
    make -j 64
    make install
  7. Load the environment variables.
    export PATH=/path/to/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH