Skip to content

Commit 36ad070

Browse files
committed
xios build CI
1 parent a082d96 commit 36ad070

File tree

6 files changed

+116
-0
lines changed

6 files changed

+116
-0
lines changed

.github/workflows/buildTest.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build-test-XIOS
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_test:
7+
name: build XIOS and run tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
# Check out repository branch
11+
- uses: actions/checkout@v4
12+
- name: Install dependencies
13+
run: |
14+
sudo apt update
15+
sudo apt -yq install subversion
16+
sudo apt -yq install $(<dependencies)
17+
- name: clone and build XIOS
18+
run: |
19+
svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/trunk XIOS2
20+
cp arch/* XIOS2/arch/
21+
cd XIOS2
22+
./make_xios --job 2 --arch GCC_LINUX_APT
23+
ls -l lib/
24+
ls -l inc/
25+
ls -l bin/
26+
cd ..
27+
- name: run generic
28+
run: |
29+
cd XIOS2/generic_testcase
30+
ln -s ../bin/generic_testcase.exe
31+
ln -s ../bin/xios_server.exe
32+
sed -i 's/nb_proc_atm=4/nb_proc_atm=1/g' param.def
33+
mpiexec -n 1 ./generic_testcase.exe : -n 1 ./xios_server.exe
34+
cd ../..

arch/arch-GCC_LINUX_APT.env

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export HDF5_INC_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/include
2+
export HDF5_LIB_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib
3+
4+
export NETCDF_INC_DIR=/usr/lib/x86_64-linux-gnu/netcdf/mpi/include:/usr/include/
5+
export NETCDF_LIB_DIR=/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib:/usr/lib/x86_64-linux-gnu
6+
7+
export BOOST_INC_DIR=/usr/include/boost
8+
export BOOST_LIB_DIR=/usr/lib/x86_64-linux-gnu
9+
10+

arch/arch-GCC_LINUX_APT.fcm

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
################################################################################
2+
################### Projet XIOS ###################
3+
################################################################################
4+
5+
%CCOMPILER mpicc
6+
%FCOMPILER mpif90
7+
%LINKER mpif90
8+
9+
%BASE_CFLAGS -w -std=c++11 -D__XIOS_EXCEPTION
10+
%PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS
11+
%DEV_CFLAGS -g -O2
12+
%DEBUG_CFLAGS -g
13+
14+
%BASE_FFLAGS -D__NONE__ -ffree-line-length-none
15+
%PROD_FFLAGS -O3
16+
%DEV_FFLAGS -g -O2
17+
%DEBUG_FFLAGS -g
18+
19+
%BASE_INC -D__NONE__
20+
%BASE_LD -lstdc++
21+
22+
%CPP cpp
23+
%FPP cpp -P
24+
%MAKE gmake

arch/arch-GCC_LINUX_APT.path

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
NETCDF_INCDIR=""
2+
IFS=':' read -r -a array <<< "$NETCDF_INC_DIR"
3+
for element in "${array[@]}"; do NETCDF_INCDIR+="-I$element "; done
4+
NETCDF_LIBDIR=""
5+
IFS=':' read -r -a array <<< "$NETCDF_LIB_DIR"
6+
for element in "${array[@]}"; do NETCDF_LIBDIR+="-L$element "; done
7+
NETCDF_LIB="-lnetcdff -lnetcdf"
8+
export NETCDF_INCDIR
9+
export NETCDF_LIBDIR
10+
11+
MPI_INCDIR=""
12+
MPI_LIBDIR=""
13+
MPI_LIB="-lcurl"
14+
15+
HDF5_INCDIR="-I $HDF5_INC_DIR"
16+
HDF5_LIBDIR="-L $HDF5_LIB_DIR"
17+
HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
18+
19+
BOOST_INCDIR="-I $BOOST_INC_DIR"
20+
BOOST_LIBDIR="-L $BOOST_LIB_DIR"
21+
BOOST_LIB=""
22+
23+
OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
24+
OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
25+
OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"

dependencies

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
g++
2+
libboost-mpi1.74-dev
3+
libhdf5-openmpi-dev
4+
libnetcdff-dev
5+
libnetcdf-mpi-dev
6+
libnetcdff-dev
7+
libpnetcdf-dev
8+
netcdf-bin

desktopEnv

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module purge
2+
module unuse /project/ukmo/rhel7/R/modulefiles; module unuse /project/ukmo/rhel7/fortran/opt/gfortran/modulefiles
3+
module use /project/extrasoftware/modulefiles.rhel7
4+
module use /data/users/lfric/software/modulefiles.rhel7
5+
6+
module load environment/lfric/gcc
7+
8+
export NETCDF_LIB_DIR=$NETCDF_4_8_1_ROOT/lib:$NETCDF_4_8_1_ROOT/lib64
9+
export NETCDF_INC_DIR=$NETCDF_4_8_1_ROOT/include
10+
11+
. arch/arch-GCC_LINUX_APT.path
12+
13+
export XIOS_INCDIR=$XIOS_R2252_2_ROOT/include
14+
export XIOS_LIBDIR=$XIOS_R2252_2_ROOT/lib
15+
export XIOS_BINDIR=$XIOS_R2252_2_ROOT/bin

0 commit comments

Comments
 (0)