Installing NetCDF-Fortran
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the NetCDF-Fortran installation package.
tar zxvf netcdf-fortran-4.4.1.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-fortran-4.4.1
- Perform the configuration.
./configure --prefix=/path/to/NETCDF CPPFLAGS="-I/path/to/HDF5/include -I/path/to/NETCDF/include" LDFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib" --build=aarch64-unknown-linux-gnu --enable-static=yes --enable-shared CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-conversion" FCFLAGS="-O3 -fPIC" LDFLAGS="-Wl,--build-id" CC=mpicc FC=mpif90 CXX=mpicxx
- Modify the libtool file in the current directory.
- Perform the compilation and installation.
make -j make install
- After the installation is complete, load the environment variables.
export PATH=/path/to/NETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment
