Index: /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.env
===================================================================
--- /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.env	(revision 4929)
+++ /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.env	(revision 4929)
@@ -0,0 +1,18 @@
+#!/bin/bash
+module purge
+module load PrgEnv-gnu
+module load cray-hdf5-parallel
+module load netcdf-hdf5parallel/gnu/10.3
+
+# netcdf-hdf5parallel has weird naming conventions => hotfix...
+# Used in netcdf95 cmake compilation
+rm -rf netcdf-hdfparallel-hotfix
+mkdir -p netcdf-hdfparallel-hotfix
+cp -r /opt/cray/pe/netcdf-hdf5parallel/4.9.0.5/gnu/10.3/lib/pkgconfig/netcdf*_parallel.pc netcdf-hdfparallel-hotfix
+cd netcdf-hdfparallel-hotfix || exit 1
+mv netcdf-fortran_parallel.pc netcdf-fortran.pc
+PKG_CONFIG_PATH="$(readlink -f .):$PKG_CONFIG_PATH"
+# Another similar hotfix to find mpich.pc
+PKG_CONFIG_PATH="/opt/cray/pe/mpich/8.1.28/ofi/crayclang/16.0/lib/pkgconfig/:$PKG_CONFIG_PATH"
+export PKG_CONFIG_PATH
+cd - || exit 1
Index: /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.fcm
===================================================================
--- /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.fcm	(revision 4929)
+++ /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.fcm	(revision 4929)
@@ -0,0 +1,35 @@
+%COMPILER            mpif90
+%CCOMPILER           mpicc  # xios
+%LINK                mpif90
+%FPP                 cpp
+%AR                  ar
+%ARFLAGS             rU
+%MAKE                make
+%FPP_FLAGS           -P -traditional
+%FPP_DEF             NC_DOUBLE
+
+%BASE_FFLAGS         -cpp -ffree-line-length-0 -fdefault-real-8 -DNC_DOUBLE
+%BASE_CFLAGS         -w -std=c++11 -D__XIOS_EXCEPTION  # xios
+# /!\ LD must be written in Makefile syntax
+%BASE_LD             -Wl,-rpath=$(shell dirname $(shell readlink -f "$(shell which mpif90)"))/../lib:$(shell nf-config --prefix)/lib -lstdc++
+%BASE_INC            -D__NONE__  # xios
+
+%PROD_FFLAGS         -O3 -fallow-argument-mismatch
+%PROD_CFLAGS         -O3 -DBOOST_DISABLE_ASSERTS  # xios
+
+%DEV_FFLAGS          -Wall -fbounds-check -fallow-argument-mismatch
+%DEV_CFLAGS          -g -O2  # xios
+
+%DEBUG_FFLAGS        -g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -fbacktrace -finit-real=snan -fallow-argument-mismatch
+%DEBUG_CFLAGS        -g -DBZ_DEBUG # xios
+
+%MPI_FFLAGS          -fcray-pointer
+%MPI_LD              -L$(shell dirname $(shell readlink -f "$(shell which mpif90)"))/../lib -lmpi
+%OMP_LD              -fopenmp
+%OMP_FFLAGS          -fopenmp -fcray-pointer
+
+%CPP                 cpp  # xios
+%FPP                 cpp -P  # xios
+%MAKE                make  # xios
+
+
Index: /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.path
===================================================================
--- /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.path	(revision 4929)
+++ /BOL/script_install_amaury/arch_local/arch-X64_ADASTRA-GNU.path	(revision 4929)
@@ -0,0 +1,21 @@
+NETCDF_INCDIR="-I$(nf-config --includedir)"
+# Ugly hack for orchidee <=2.0
+NETCDF_LIBDIR="-L${NETCDF_DIR}/lib" # for some reason on adastra `nf-config --flibs` is empty
+NETCDF_LIB="-lnetcdf -lnetcdff"  # same as above
+NETCDF95_INCDIR="-I$LMDGCM/../../include"
+NETCDF95_LIBDIR="-L$LMDGCM/../../lib"
+NETCDF95_LIB="-lnetcdf95"
+
+# Exported
+IOIPSL_INCDIR="-I$IOIPSL_INCDIR_ -I$IOIPSL_LIBDIR_"
+IOIPSL_LIBDIR="-L$IOIPSL_INCDIR_ -L$IOIPSL_LIBDIR_"
+IOIPSL_LIB="-lioipsl"
+
+# Exported
+XIOS_INCDIR="-I$XIOS_INCDIR_"
+XIOS_LIBDIR="-L$XIOS_LIBDIR_"
+XIOS_LIB="-lxios -lstdc++"
+
+# Exported
+ORCH_INCDIR="-I$ORCH_INCDIR_ -I$ORCH_LIBDIR_"
+ORCH_LIBDIR="-L$ORCH_LIBDIR_ -L$ORCH_INCDIR_"
Index: /BOL/script_install_amaury/install_lmdz.sh
===================================================================
--- /BOL/script_install_amaury/install_lmdz.sh	(revision 4928)
+++ /BOL/script_install_amaury/install_lmdz.sh	(revision 4929)
@@ -55,5 +55,4 @@
     netcdf=1
     bench=1
-    pcmac=0 # default: not on a Mac
     SCM=0
     veget="none"
@@ -61,7 +60,4 @@
     physiq=""
 
-    xios_branch="2.6"
-    xios_rev="2568"
-
     parallel="none"
     trusting="testing"
@@ -76,11 +72,9 @@
 
     cosp="none"
-    opt_cosp=""
 
     make_j=8
 
-    # Check if on a Mac
+    # Check if on a Mac /!\ Probably doesn't work anymore, to fix one day...
     if [[ $(uname) = "Darwin" ]]; then
-        pcmac=1
         export MAKE="make"
     fi
@@ -116,5 +110,5 @@
         -bench     activating the bench or not (0/1) (default: <$bench>)
 
-        -testing/unstable
+        -unstable  use unstable tar instead of testing
 
         -name      name of the folder to install to (default <$MODEL>)
@@ -134,5 +128,5 @@
         -debug      compile everything in debug mode
 
-        -physiq     to choose which physics package to use (default <$physiq>)
+        -physiq     to choose which physics package to use in the bench (default <$physiq>)
 
         -veget      surface/vegetation scheme treatment controlled by the single variable veget which can have the following values: none: bucket scheme (default); CMIP6 | veget2.0: orchidee version used in CMIP exercise, rev 5661; veget2.2: orchidee branch 2.2, rev 8529 (bundled); number: orchidee version number (default $veget)
@@ -149,5 +143,5 @@
             "-r") svn_lmdz=$2; shift; shift;;
             "-d") grid_resolution=$2; shift; shift;;
-            "-unstable"|"-testing") trusting=$(echo "$1" | cut -c2-); shift;;
+            "-unstable") trusting="unstable"; shift;;
             "-cosp") cosp=$2
                      case $cosp in
@@ -467,16 +461,9 @@
 
         # Download XIOS
-        case $xios_branch in
-            "trunk")
-            xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS/trunk";;
-            "2.5")
-            xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.5";;
-            "2.6")
-            xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.6";;
-            *) echo "XIOS: Error, bad argument for -branch ! Did not expect $xios_branch"; exit 1;;
-        esac
+        local xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.6"
+        local xios_rev="2568"
         
         cd "$MODEL/modipsl/modeles"
-        set +e; svn co --revision $xios_rev $xios_http XIOS; set -e
+        set +e; svn co -r $xios_rev $xios_http XIOS; set -e
 
         cd XIOS
@@ -749,4 +736,5 @@
         cd "BENCH${grid_resolution}"
 
+        local bench_cmd="./bench.sh"
         if [[ ${parallel:0:3} = "mpi" ]]; then
             # Lancement avec deux procs mpi et 2 openMP
@@ -755,20 +743,29 @@
                 echo "export OMP_NUM_THREADS=2" >> bench.sh
             fi
-            if [[ "$cosp" = "v1" || "$cosp" = "v2" ]]; then
+            if [[ $cosp = "v1" || $cosp = "v2" ]]; then
                 echo "ulimit -s 200000" >> bench.sh
             else
                 echo "ulimit -s unlimited" >> bench.sh
             fi
-            echo "mpirun -np 2 gcm.e > listing  2>&1" >> bench.sh
+            if which mpirun > /dev/null 2>&1; then
+                echo "mpirun -np 2 gcm.e > listing 2>&1" >> bench.sh
+            elif grep -q "Adastra" /etc/motd; then
+                local account
+                account=$(/usr/sbin/my_project.py -l 2>&1 | head -1 | cut -d " " -f 3- | cut -c 5-)
+                bench_cmd="srun --nodes=1 --ntasks=1 --cpus-per-task=2 --threads-per-core=2 --time=0:10:00 --constraint=GENOA --account=$account bash bench.sh"
+                echo "./gcm.e > listing 2>&1" >> bench.sh
+            else
+                echo "Error: No command found to run parallel bench"; exit 1
+            fi
             # Add rebuild, using reb.sh if it is there
             cat <<EOF >> bench.sh
-    if [[ -f reb.sh ]]; then
-      ./reb.sh histday; ./reb.sh histmth; ./reb.sh histhf;
-      ./reb.sh histins; ./reb.sh stomate_history;
-      ./reb.sh sechiba_history; ./reb.sh sechiba_out_2
-    fi
+if [[ -f reb.sh ]]; then
+  ./reb.sh histday; ./reb.sh histmth; ./reb.sh histhf;
+  ./reb.sh histins; ./reb.sh stomate_history;
+  ./reb.sh sechiba_history; ./reb.sh sechiba_out_2
+fi
 EOF
         else
-            echo "./gcm.e > listing  2>&1" > bench.sh
+            echo "./gcm.e > listing 2>&1" > bench.sh
         fi
         # Getting orchidee stuff
@@ -816,5 +813,5 @@
         echo "EXECUTION DU BENCH"
         date
-        if (! ./bench.sh > out.bench 2>&1) || ! (tail -n 1 listing | grep "Everything is cool"); then
+        if (! $bench_cmd > out.bench 2>&1) || ! (tail -n 1 listing | grep "Everything is cool"); then
             tail listing
             echo "Bench FAILED, exiting"; exit 1
Index: /BOL/script_install_amaury/test_compils.sh
===================================================================
--- /BOL/script_install_amaury/test_compils.sh	(revision 4928)
+++ /BOL/script_install_amaury/test_compils.sh	(revision 4929)
@@ -14,5 +14,5 @@
         args="$args-parallel"
     fi
-    args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios $lmdzrev"
+    args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios $lmdzrev $cosp"
     # trim
     args=$(echo "$args" | xargs)
@@ -37,11 +37,13 @@
 function run_all_tests {
     for parallel in "none" "mpi_omp"; do
-    for rad in "oldrad" "rrtm"; do
+    for rad in "oldrad" "rrtm" "ecrad"; do
     for veget in "none" "orch2.0" "orch2.2"; do
     for xios in "" "-xios"; do
-    if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi
+      if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi
     for lmdzrev in "" "-r 4894"; do  # TODO when base lmdz becomes >=4894, change condition for lmdzrev=""
         if [[ (! $veget = "none") && ($parallel = "none") && ($(echo "$lmdzrev" | cut -c 4-) -lt 4894) ]]; then continue; fi
+    for cosp in "" "-cosp v1" "-cosp v2"; do
         do_one_test
+    done
     done
     done
