我要评分
获取效率
正确性
完整性
易理解

Installing XIOS

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to create the XIOS installation directory:
    mkdir -p /path/to/XIOS
  3. Run the following command to switch to the directory generated after the package is decompressed:
    cd /path/to/XIOS
  4. Run the following command to download the XIOS source code:
    
    

    Before running this command, ensure that the server can access the Internet.

  5. Run the following commands to install the system dependency libraries:
    yum install -y perl-lib* boost-*
  6. Run the following command to switch to the directory generated after the package is decompressed:
    cd xios-1.0
  7. Run the following commands to modify the bld.cfg file:
    1. Open bld.cfg.
      vi bld.cfg
    2. Press I to enter the insert mode and modify the bld.cfg file. Pay attention to the information in bold.
      search_src           true
      src::zzz .
      #src::date $PWD/extern/boost/src/date_time
      src::blitz $PWD/extern/blitz/src
      src::netcdf $PWD/extern/netcdf4
      bld::lib xios
      bld::target libxios.a
      #bld::target generate_fortran_interface.exe
      #bld::target xios_server.exe test_client.exe parse_xml.exe test_complete.exe test_xios_interface.exe
      bld::exe_dep
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Run the following command to create and edit the arch-AARCH64_GNU_LINUX.env configuration file:
    1. Create an arch-AARCH64_GNU_LINUX.env configuration file.
      vi arch/arch-AARCH64_GNU_LINUX.env
    2. Press i to enter the insert mode and create and edit the arch-AARCH64_GNU_LINUX.env file.

      Edit the file based on the actual environment variables and dependency library installation path.

      export HDF5_INC_DIR="/path/to/HDF5/include"
      export HDF5_LIB_DIR="/path/to/HDF5/lib"
       
      export NETCDF_INC_DIR="/path/to/NETCDF/include"
      export NETCDF_LIB_DIR="/path/to/NETCDF/lib"
       
      export BOOST_INC_DIR="/usr/include/boost/"
      export BOOST_LIB_DIR="/usr/lib64/"
       
      export BLITZ_INC_DIR="/path/to/BLITZ/include"
      export BLITZ_LIB_DIR="/path/to/BLITZ/lib"
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  9. Run the following command to create and edit the arch-AARCH64_GNU_LINUX.fcm configuration file:
    1. Create an arch-AARCH64_GNU_LINUX.fcm configuration file.
      vi arch/arch-AARCH64_GNU_LINUX.fcm
    2. Press i to enter the insert mode and create and edit the arch-AARCH64_GNU_LINUX.fcm file.

      Edit the file based on the actual environment variables and dependency library installation path.

      ################################################################################
      ###################        Projet xios - xmlioserver       #####################
      ################################################################################
       
      %CCOMPILER      mpicc
      %FCOMPILER      mpif90
      %LINKER         mpif90
       
      %BASE_CFLAGS    -ansi -w -D_GLIBCXX_USE_CXX11_ABI=0
      %PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
      %DEV_CFLAGS     -g -O2
      %DEBUG_CFLAGS   -g
       
      %BASE_FFLAGS    -D__NONE__
      %PROD_FFLAGS    -O3
      %DEV_FFLAGS     -g -O2
      %DEBUG_FFLAGS   -g
       
      %BASE_INC       -D__NONE__
      %BASE_LD        -lstdc++
       
      %CPP            cpp
      %FPP            cpp -P
      %MAKE           gmake
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  10. Run the following command to create and edit the arch-AARCH64_GNU_LINUX.path configuration file:
    1. Create an arch-AARCH64_GNU_LINUX.path configuration file.
      vi arch/arch-AARCH64_GNU_LINUX.path
    2. Press i to enter the insert mode and create and edit the arch-AARCH64_GNU_LINUX.path file.

      Edit the file based on the actual environment variables and dependency library installation path.

      NETCDF_INCDIR="-I /path/to/NETCDF/include"
      NETCDF_LIBDIR="-L /path/to/NETCDF/lib"
      NETCDF_LIB="-lnetcdff -lnetcdf"
       
      MPI_INCDIR="-I /path/to/OPENMPI/include"
      MPI_LIBDIR="-L /path/to/OPENMPI/lib"
      MPI_LIB="-lmpi"
       
      HDF5_INCDIR="-I /path/to/HDF5/include"
      HDF5_LIBDIR="-L /path/to/HDF5/lib"
      HDF5_LIB="-lhdf5_hl -lhdf5  -lz"
       
      BOOST_INCDIR="-I /usr/include/boost/"
      BOOST_LIBDIR="-L /usr/lib64/"
      BOOST_LIB=""
       
      BLITZ_INCDIR="-I /path/to/BLITZ/include"
      BLITZ_LIBDIR="-L /path/to/BLITZ/lib"
      BLITZ_LIB="-lblitz"
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  11. Run the following commands to perform the first compilation and installation:
    cd /path/to/XIOS/xios-1.0
    chmod +x ./make_xios
    cd extern
    ln -s /path/to/BLITZ ./blitz
    ln -s /path/to/NETCDF ./netcdf4
    ln -s /usr/include/boost ./boost
    cd ..
    ./make_xios --dev --job 32 --full --arch AARCH64_GNU_LINUX
  12. Run the following commands to perform the second compilation and installation:

    If an error is reported after the first compilation, run the following command again:

    cd extern
    rm -rf ./blitz
    rm -rf ./netcdf4
    rm -rf ./boost
    ln -s /path/to/BLITZ ./blitz
    ln -s /path/to/NETCDF ./netcdf4
    ln -s /usr/include/boost ./boost
    cd ..
    ./make_xios --dev --job 32 --full --arch AARCH64_GNU_LINUX