Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Go to the CAMx installation package directory.
cd /path/to/CAMX
- Decompress the CAMx installation package.
tar -xvf CAMx_v7.10.src.210105.tgz
- Go to the source code directory.
cd src.v7.10
- Modify the Makefile file.
- Open the Makefile file.
vi Makefile
- Press i to enter the edit mode and modify lines 60, 61, and 250 of Makefile.
60 MPI_INST = /path/to/install/ompi 61 NCF_INST = /path/to/NETCDF 250 FLGS=$(INCLUDES) -O2 -Wno-unused-command-line-argument -fno-fortran-main -mcmodel=small -J${MOD_DIR} -fno-align-commons -fconvert=big-endian -frecord -marker=4 -ffixed-line-length-0 -lgfortran
- After performing 5.a, press Esc, type :set nu, and press Enter to display the line number.
- If an error similar to the line 25 error is reported when you run the FLGS command, set the FLGS parameter as follows:
FLGS=$(INCLUDES) -O2 -mcmodel=small -J${MOD_DIR} -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-132
- Press Esc, enter :wq!, and press Enter to save the changes and exit.
- Open the Makefile file.
- Modify the MPI/util/Makefile file.
- Compile and install the software.
make COMPILER=gfortran MPI=mpich3 NCF=NCF4_C -j 8
After the compilation is successful, the executable file CAMx.v7.10.MPICH3.NCF4.gfortran is generated in the current directory. You can run the ls or ll command to view the file. The following figure shows the command output.

Parent topic: CAMx 7.10 Porting Guide (openEuler 21.03)