Installing PnetCDF
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following commands to load the compiler and Open MPI. If the commands have been run, skip this step.
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
- Run the following command to decompress the PnetCDF installation package:
tar zxvf pnetcdf-1.11.2.tar.gz
- Run the following command to go to the directory generated after the decompression:
cd pnetcdf-1.11.2
- Run the following command to perform the configuration:
export MPICC=mpicc export MPICXX=mpicxx export MPIFC=mpifort ./configure --prefix=$PNETCDF CFLAGS="-fPIC -DPIC" CXXFLAGS="-fPIC -DPIC" FCFLAGS="-fPIC" FFLAGS="-fPIC" CC=$MPICC CXX=$MPICXX FC=$MPIFC F77=$MPIFC
- Run the following commands to perform the compilation and installation:
make -j 16 make install
- Run the following commands to load environment variables:
export PATH=/path/to/PNETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/PNETCDF/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment