Installing XIOS
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to create the XIOS installation directory:
mkdir -p /path/to/XIOS
- Run the following command to switch to the directory generated after the package is decompressed:
cd /path/to/XIOS
- Run the following command to download the XIOS source code:
Before running this command, ensure that the server can access the Internet.
- Run the following commands to install the system dependency libraries:
yum install -y perl-lib* boost-*
- Run the following command to switch to the directory generated after the package is decompressed:
cd xios-1.0
- Run the following commands to modify the bld.cfg file:
- Open bld.cfg.
vi bld.cfg
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open bld.cfg.
- Run the following command to create and edit the arch-AARCH64_GNU_LINUX.env configuration file:
- Create an arch-AARCH64_GNU_LINUX.env configuration file.
vi arch/arch-AARCH64_GNU_LINUX.env
- 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"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create an arch-AARCH64_GNU_LINUX.env configuration file.
- Run the following command to create and edit the arch-AARCH64_GNU_LINUX.fcm configuration file:
- Create an arch-AARCH64_GNU_LINUX.fcm configuration file.
vi arch/arch-AARCH64_GNU_LINUX.fcm
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create an arch-AARCH64_GNU_LINUX.fcm configuration file.
- Run the following command to create and edit the arch-AARCH64_GNU_LINUX.path configuration file:
- Create an arch-AARCH64_GNU_LINUX.path configuration file.
vi arch/arch-AARCH64_GNU_LINUX.path
- 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"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create an arch-AARCH64_GNU_LINUX.path configuration file.
- 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
- 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
Parent topic: Configuring the Compilation Environment