Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-Fortran

Procedure

  1. Download the NetCDF-Fortran source package.
  2. Upload the source package to its installation directory on the server, for example, /path/to/download/netcdf-fortran.
  3. Go to the source package directory.
    cd /path/to/download/netcdf-fortran
  4. Decompress the installation package.
    tar -zxvf netcdf-fortran-4.5.2.tar.gz
  5. Switch to the directory of the configure script.
    cd netcdf-fortran-4.5.2
  6. Install NetCDF-Fortran.
    ./configure --prefix=/path/to/install/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=" -fPIC  -I/path/to/install/HDF5/include -I/path/to/install/NETCDF/include" LDFLAGS="-L/path/to/install/HDF5/lib -L/path/to/install/NETCDF/lib -Wl,-rpath=/path/to/install/HDF5/lib -Wl,-rpath=/path/to/install/NETCDF/lib" CFLAGS=" -fPIC -L/path/to/install/HDF5/lib -L/path/to/install/NETCDF/lib -I/path/to/install/HDF5/include -I/path/to/install/NETCDF/include" CXXFLAGS=" -fPIC -L/path/to/install/HDF5/lib -L/path/to/install/NETCDF/lib -I/path/to/install/HDF5/include -I/path/to/install/NETCDF/include" FCFLAGS=" -fPIC -L/path/to/install/HDF5/lib -L/path/to/install/NETCDF/lib -I/path/to/install/HDF5/include -I/path/to/install/NETCDF/include"
  7. Modify the libtool file in the current directory.
    vi libtool

    In line 11787, change wl="" to wl="-Wl,".

    In line 11939, change wl="" to wl="-Wl,".

    The line numbers may vary according to each NetCDF-Fortran version. Search for wl="" to determine the line numbers.

  8. Perform the compilation and installation.
    make
    make install