mkdir -p /path/to/XIOS
cd /path/to/XIOS
使用此命令前提是服务器必须配置为可使用Internet。
yum install -y perl-lib* boost-*
cd xios-1.0
vi bld.cfg
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
vi arch/arch-AARCH64_GNU_LINUX.env
根据实际的环境变量及依赖库安装路径。
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"
vi arch/arch-AARCH64_GNU_LINUX.fcm
根据实际的环境变量及依赖库安装路径。
################################################################################ ################### 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
vi arch/arch-AARCH64_GNU_LINUX.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"
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
第一次编译执行后会报错,再执行一遍以下命令。
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