Skip to content

Commit

Permalink
xios build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-marqh committed Jan 24, 2024
1 parent a082d96 commit 36ad070
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/buildTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build-test-XIOS

on: [push, pull_request]

jobs:
build_test:
name: build XIOS and run tests
runs-on: ubuntu-latest
steps:
# Check out repository branch
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt -yq install subversion
sudo apt -yq install $(<dependencies)
- name: clone and build XIOS
run: |
svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/trunk XIOS2
cp arch/* XIOS2/arch/
cd XIOS2
./make_xios --job 2 --arch GCC_LINUX_APT
ls -l lib/
ls -l inc/
ls -l bin/
cd ..
- name: run generic
run: |
cd XIOS2/generic_testcase
ln -s ../bin/generic_testcase.exe
ln -s ../bin/xios_server.exe
sed -i 's/nb_proc_atm=4/nb_proc_atm=1/g' param.def
mpiexec -n 1 ./generic_testcase.exe : -n 1 ./xios_server.exe
cd ../..
10 changes: 10 additions & 0 deletions arch/arch-GCC_LINUX_APT.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export HDF5_INC_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/include
export HDF5_LIB_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib

export NETCDF_INC_DIR=/usr/lib/x86_64-linux-gnu/netcdf/mpi/include:/usr/include/
export NETCDF_LIB_DIR=/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib:/usr/lib/x86_64-linux-gnu

export BOOST_INC_DIR=/usr/include/boost
export BOOST_LIB_DIR=/usr/lib/x86_64-linux-gnu


24 changes: 24 additions & 0 deletions arch/arch-GCC_LINUX_APT.fcm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
################################################################################
################### Projet XIOS ###################
################################################################################

%CCOMPILER mpicc
%FCOMPILER mpif90
%LINKER mpif90

%BASE_CFLAGS -w -std=c++11 -D__XIOS_EXCEPTION
%PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS
%DEV_CFLAGS -g -O2
%DEBUG_CFLAGS -g

%BASE_FFLAGS -D__NONE__ -ffree-line-length-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
25 changes: 25 additions & 0 deletions arch/arch-GCC_LINUX_APT.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
NETCDF_INCDIR=""
IFS=':' read -r -a array <<< "$NETCDF_INC_DIR"
for element in "${array[@]}"; do NETCDF_INCDIR+="-I$element "; done
NETCDF_LIBDIR=""
IFS=':' read -r -a array <<< "$NETCDF_LIB_DIR"
for element in "${array[@]}"; do NETCDF_LIBDIR+="-L$element "; done
NETCDF_LIB="-lnetcdff -lnetcdf"
export NETCDF_INCDIR
export NETCDF_LIBDIR

MPI_INCDIR=""
MPI_LIBDIR=""
MPI_LIB="-lcurl"

HDF5_INCDIR="-I $HDF5_INC_DIR"
HDF5_LIBDIR="-L $HDF5_LIB_DIR"
HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"

BOOST_INCDIR="-I $BOOST_INC_DIR"
BOOST_LIBDIR="-L $BOOST_LIB_DIR"
BOOST_LIB=""

OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
8 changes: 8 additions & 0 deletions dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
g++
libboost-mpi1.74-dev
libhdf5-openmpi-dev
libnetcdff-dev
libnetcdf-mpi-dev
libnetcdff-dev
libpnetcdf-dev
netcdf-bin
15 changes: 15 additions & 0 deletions desktopEnv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module purge
module unuse /project/ukmo/rhel7/R/modulefiles; module unuse /project/ukmo/rhel7/fortran/opt/gfortran/modulefiles
module use /project/extrasoftware/modulefiles.rhel7
module use /data/users/lfric/software/modulefiles.rhel7

module load environment/lfric/gcc

export NETCDF_LIB_DIR=$NETCDF_4_8_1_ROOT/lib:$NETCDF_4_8_1_ROOT/lib64
export NETCDF_INC_DIR=$NETCDF_4_8_1_ROOT/include

. arch/arch-GCC_LINUX_APT.path

export XIOS_INCDIR=$XIOS_R2252_2_ROOT/include
export XIOS_LIBDIR=$XIOS_R2252_2_ROOT/lib
export XIOS_BINDIR=$XIOS_R2252_2_ROOT/bin

0 comments on commit 36ad070

Please sign in to comment.