Installing NetCDF
- Use PuTTY to log in to the server as the root user.
- Set the environment variables.
export PATH=/path/to/GNU/bin:/path/to/OPENMPI/bin:$PATH export LD_LIBRARY_PATH=/path/to/GNU/lib64:/path/to/OPENMPI/lib:$LD_LIBRARY_PATH
- Install the base dependencies.
yum install curl* -y
- Decompress the NetCDF installation package.
tar -xvf netcdf-4.4.1.1.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-4.4.1.1
- Create a /path/to/NETCDF directory.
mkdir -p /path/to/NETCDF
- 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 CPPFLAGS="-I/path/to/HDF5/include -I/path/to/PNETCDF/include" LDFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/PNETCDF/lib" CFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -I/path/to/HDF5/include -I/path/to/PNETCDF/include"
- Perform the compilation and installation.
make -j 16 make install
Parent topic: Configuring the Compilation Environment