Installing NetCDF-C
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the NetCDF-C installation package.
tar -zxvf netcdf-c-4.7.4.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-c-4.7.4 export CPPFLAGS="-I/path/to/HDF5/include -I/path/to/PNETCDF/include -I/path/to/CURL/include" export LDFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -L/path/to/CURL/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/PNETCDF/lib -Wl,-rpath=/path/to/CURL/lib" export CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-null-conversion"
- Perform the configuration.
./configure --prefix=/path/to/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 F90=mpifort
- Perform the compilation and installation.
make -j 64 make install
- 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