Installing NetCDF
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to decompress the NetCDF installation package:
tar -xvf netcdf-4.4.1.1.tar.gz
- Run the following command to switch to the directory generated after the package is decompressed:
cd netcdf-4.4.1.1
- Run the following commands to configure the environment before compilation:
export MPICC=mpicc export MPICXX=mpicxx export MPIFC=mpifort export CPPFLAGS="-I/path/to/HDF5/include -I/path/to/PNETCDF/include" export LDFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/PNETCDF/lib" export CFLAGS="-L/path/to/HDF5/lib -L/path/to/PNETCDF/lib -I/path/to/HDF5/include -I/path/to/PNETCDF/include"
- Run the following command to perform 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=$MPIFC F77=$MPIFC
- Run the following commands to perform compilation and installation:
make -j 16 make install
Parent topic: Configuring the Compilation Environment