Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the CAMx installation package directory.
    cd /path/to/CAMX
  3. Decompress the CAMx installation package.
    tar -xvf CAMx_v7.10.src.210105.tgz
  4. Go to the source code directory.
    cd src.v7.10
  5. Modify the Makefile file.
    1. Open the Makefile file.
      vi Makefile
    2. 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

    3. Press Esc, enter :wq!, and press Enter to save the changes and exit.
  6. Modify the MPI/util/Makefile file.
    1. Open the MPI/util/Makefile file.
      vi MPI/util/Makefile
    2. Press i to enter the edit mode and modify lines 4 and 18 of MPI/util/Makefile.
      4 MPI_INST = /path/to/install/ompi
      18 CFLAGS = -mcmodel=small -O2 -I $(INC)

      After performing 6.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, enter :wq!, and press Enter to save the changes and exit.
  7. 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.