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.0.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-c-4.7.0
- Perform the configuration. (If the CC, FC, and CXX environment variables fail to be set, you can use an absolute path.)
./configure --prefix=/path/to/NETCDF CC=mpicc --disable-dap FC=mpif90 CXX=mpicxx
- Perform the compilation and installation.
make make install
- Set the NetCDF-C environment variables.
export PATH=/path/to/NETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH export NETCDF=/path/to/NETCDF
Parent topic: Configuring the Compilation Environment