Installing NetCDF-C
Procedure
- Use PuTTY to log in to the server as the root user.
- Install the dependencies.
yum install -y curl libcurl-devel zlib-devel
- 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.
CC=mpicc CFLAGS="$optflags -I/path/to/HDF5/include -I/path/to/PNETCDF/include" LDFLAGS="$ldflags -L/opt/compiler/BS/bisheng-compiler-1.3.1-aarch64-linux/lib -L/path/to/HDF5/lib -L/path/to/PNETCDF/lib" ./configure --prefix=/path/to/NETCDF --build=aarch64-linux --enable-static --enable-shared --with-pic --enable-parallel-tests --enable-pnetcdf --enable-largefile --enable-large-file-tests --disable-dap

- Perform the installation.
make -j$threads

make install

- Verify the installation.
ls /path/to/NETCDF/bin ls /path/to/NETCDF/lib

- 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