Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Installing the I/O API

  1. Use PuTTY to log in to the server as the root user.
  2. Install SMOKE in csh.
    csh
  3. Set the environment variables.
    setenv SMK_HOME /path/to/SMOKE
    setenv LD_LIBRARY_PATH /path/to/BISHENG/bisheng-1.3.1/lib:/path/to/HMPI/hmpi-1.0.2/ompi/lib
    setenv PATH /path/to/HMPI/hmpi-1.0.2/hmpi/bin:/path/to/BISHENG/bisheng-1.3.1/bin:$PATH
    setenv LD_LIBRARY_PATH /path/to/NETCDF/lib:$LD_LIBRARY_PATH
  4. Copy the installation packages to the installation path.
    cp smoke_v47.gz $SMK_HOME
    cp smoke_v47.nctox.data.tar.gz $SMK_HOME
    cp smoke_install.csh $SMK_HOME
    cp ioapi-3.2.tar.gz $SMK_HOME
    cd $SMK_HOME
    source smoke_install_v47.csh
    setenv BIN Linux2_aarch64
  5. Decompress and rename the ioapi file.
    tar -xvf ioapi-3.2-2020111.tar.gz
    mv ioapi-3.2-2020111 ioapi-3.2
  6. Copy the configuration file.
    cd ioapi-3.2
    cp ioapi/Makeinclude.Linux2_ia64gfort ioapi/Makeinclude.Linux2_aarch64
  7. Modify the Makeinclude.Linux2_aarch64 configuration file.
    1. Open the Makeinclude.Linux2_aarch64 configuration file.
      vi ioapi/Makeinclude.Linux2_aarch64
    2. Press i to enter the edit mode and modify the compiler options (you can use an absolute path if necessary).
      CC = mpicc
      CXX = mpicxx
      FC = mpif90

      Comment out the line corresponding to the FSFLAGS keyword, for example, #FSFLAGS = -save.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Copy the Makefile file.
    cp ioapi/Makefile.nocpl ioapi/Makefile
  9. Copy the configuration file.
    cp m3tools/Makefile.nocpl m3tools/Makefile
  10. Modify the Makefile configuration file.
    1. Open the Makefile configuration file.
      vi m3tools/Makefile
    2. Press i to enter the edit mode and modify the file as follows:
      LIBS = -L${OBJDIR} -lioapi -L/path/to/NETCDF/lib -lnetcdff –lnetcdf -L/path/to/HDF5/lib -lhdf5_hl -lhdf5 -lz $(OMPLIBS) $(ARCHLIB) $(ARCHLIBS)
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  11. Copy the configuration file.
    cp Makefile.template Makefile
  12. Edit the configuration file.
    1. Open the configuration file.
      vi Makefile
    2. Press i to enter the edit mode.
      Modify the following content and remove the comments. (If the path is incorrect, check whether the path in BASEDIR is correct.)
      BIN = Linux2_aarch64
      BASEDIR = ${PWD}
      INSTALL = ${HOME}
      LIBINST = $(INSTALL)/$(BIN)
      BININST = $(INSTALL)/$(BIN)
      CPLMODE = nocpl
      IOAPIDEFS = "-DIOAPI_NCF4"

      Modify NCFLIBS.

      NCFLIBS = -L/path/to/NETCDF/lib -lnetcdff -lnetcdf -L/path/to/HDF5/lib -lhdf5_hl -lhdf5 -lz
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  13. Compile the I/O API.
    make BIN=Linux2_aarch64

Installing SMOKE

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the $SMK_HOME/subsys/smoke/assigns/ directory.
    cd $SMK_HOME/subsys/smoke/assigns/
  3. Modify the ASSIGNS.nctox.cmaq.cb05_soa.us12-nc file.
    1. Open the ASSIGNS.nctox.cmaq.cb05_soa.us12-nc file.
      vi ASSIGNS.nctox.cmaq.cb05_soa.us12-nc
    2. Press i to enter the edit mode and modify the content in line 25.
      setenv BIN Linux2_aarch64

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

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Modify the Makeinclude file.
    1. Open the Makeinclude file.
      cd $SMK_HOME/subsys/smoke/src
      vi Makeinclude
    2. Press i to enter the edit mode and modify the following content. (If an error is reported for the link library, add the absolute path of the library in the format of -L/Absolute path.)
      INSTDIR = ${OBJDIR}/${BIN}
      #EFLAG = -extend-source 132 -zero
      EFLAG = -ffixed-line-length-132 -fno-backslash
      IOLIB = -L$(IOBIN) -lioapi -L/path/to/NETCDF/lib -lnetcdf -lnetcdff
      IOBASE  = ${SMK_HOME}/ ioapi-3.2
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Modify the biog/normbeis361.f file.
    1. Open the biog/normbeis361.f file.
      vi biog/normbeis361.f
    2. Press i to enter the insert mode and change the types of the IS_AG and IS_TAG functions in line 161 from INTEGER to LOGICAL.

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

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Modify the emutil/gentpro.f file.
    1. Open the emutil/gentpro.f file.
      vi emutil/gentpro.f
    2. Press i to enter the edit mode and modify lines 1663 and 1695 of the file.
      1663 (( PROF_MON( S,NP )), NP = 1,12 )
      1695 ( ( PROF_DAY( S,NP ) ), NP = 1,31 )

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

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Create the directory.
    mkdir ${SMK_HOME}/subsys/smoke/${BIN}
  8. Perform the compilation.
    source $SMK_HOME/subsys/smoke/assigns/ASSIGNS.nctox.cmaq.cb05_soa.us12-nc
    make