Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the I/O API

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to run SMOKE in csh:
    chsh -s /bin/csh
  3. Run the following command to reboot the system for the installation to take effect:
    reboot
  4. Run the following commands to set the environment variables:
    echo "setenv SMK_HOME /path/to/SMOKE" >> /root/.tcsh
    echo "setenv BIN Linux2_aarch64gfort" >> /root/.tcsh
    echo "setenv LD_LIBRARY_PATH /path/to/GNU/gcc9.1/lib64: /path/to/OPENMPI/openmpi-4.0.1-gcc9.1/lib" >> /root/.tcsh
    echo setenv PATH /path/to/OPENMPI/openmpi-4.0.1- gcc9.1/bin:/path/to/GNU/gcc9.1/bin:$PATH>> /root/.tcsh
    echo setenv LD_LIBRARY_PATH /path/to/NETCDF/lib:$LD_LIBRARY_PATH >> /root/.tcsh
  5. Run the following command to make the environment variables take effect:
    source /root/.tcsh
  6. Run the following commands to copy the installation packages to the installation paths:
    cp smoke_v47.Linux2_x86_64ifort.tar.gz /path/to/SMOKE
    cp smoke_v47.nctox.data.tar.gz /path/to/SMOKE
    cp smoke_install.csh /path/to/SMOKE
    cp ioapi-3.2.tar.gz /path/to/SMOKE
    cd /path/to/SMOKE
    source smoke_install.csh
  7. Run the following command to create the directory:
    mkdir -p $SMK_HOME/subsys/ioapi
    mkdir -p $SMK_HOME/subsys/ioapi/$BIN
  8. Run the following command to decompress the ioapi-3.2.tar.gz installation package:
    cp ioapi-3.2.tar.gz ./subsys/ioapi/
    cd ./subsys/ioapi
    tar -xvf ioapi-3.2.tar.gz
  9. Run the following command to create a Makefile file.
    cd $SMK_HOME/subsys/ioapi/ioapi
    cp Makefile.nocpl Makefile
  10. Run the following command to modify the Makefile file:
    1. Open Makefile.
      vi Makefile
    2. Press i to enter the insert mode and modify the file as follows:
      BASEDIR = ${SMK_HOME}/subsys/ioapi
      INSTDIR = ${BASEDIR}/${BIN}
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  11. Run the following command to modify the Makeinclude.Linux2_x86_64gfort file:
    1. Open Makeinclude.Linux2_x86_64gfort.
      vi Makeinclude.Linux2_x86_64gfort
    2. Press i to enter the insert mode and modify the file as follows:
      MFLAGS = -ffast-math -funroll-loops -march=armv8-a
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  12. Run the following command to perform the compilation:
    make
  13. Run the following commands to set soft links:
    cd ../$BIN
    ln -sf /path/to/NETCDF/lib/libnetcdf.so ./
    ln -sf /path/to/NETCDF/lib/libnetcdff.so ./
  14. Run the following command to switch to the m3tools directory:
    cd ../m3tools
  15. Run the following command to modify the Makefile file:
    1. Open Makefile.
      cp Makefile.nocpl Makefile
      Run the vi Makefile command. 
    2. Press i to enter the insert mode and modify the file as follows:
      BASEDIR = ${SMK_HOME}/subsys/ioapi
      INSTDIR = ${BASEDIR}/${BIN}
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  16. Run the following command to perform the compilation:
    make