Installing NetCDF-C
Procedure
- Download the NetCDF-C source package.
- Upload the source package to its installation directory on the server, for example, /path/to/download/netcdf-c.
- Go to the source package directory.
cd /path/to/download/netcdf-c
- Decompress the installation package.
tar -zxvf netcdf-c-4.7.4.tar.gz
- Switch to the directory of the configure script.
cd netcdf-c-4.7.4
- Install NetCDF-C.
./configure --prefix=/path/to/install/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 CPPFLAGS="-I/path/to/install/HDF5/include -I/path/to/install/PNETCDF/include" LDFLAGS="-L/path/to/install/HDF5/lib -L/path/to/install/PNETCDF/lib -Wl,-rpath=/path/to/install/HDF5/lib -Wl,-rpath=/path/to/install/PNETCDF/lib" CFLAGS="-L/path/to/install/HDF5/lib -L/path/to/install/PNETCDF/lib -I/path/to/install/HDF5/include -I/path/to/install/PNETCDF/include"
- Perform the compilation and installation.
make -j 16 make install
- Set the environment variables.
export PATH=/path/to/install/NETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/install/NETCDF/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment