Commit f73ae22d authored by Romain Pennel's avatar Romain Pennel
Browse files

Merge branch 'feature/trunk/testing' into 'trunk2master' :

small changes in testing to compile xios with same env file than dynamico 
port testing from jean-zay to irene
parents 7aca3650 e68ca135
Pipeline #135418 passed with stages
in 6 minutes and 7 seconds
......@@ -2,11 +2,12 @@
# module feature/openmpi/mpi_compiler/intel is made necessary by c++/gnu
module purge
module load flavor/buildcompiler/intel/17
module load feature/openmpi/mpi_compiler/intel
module load c++/gnu/7.3.0
module load intel/17.0.6.256
module load mpi/openmpi/2.0.4
module load flavor/hdf5/parallel
module load hdf5/1.8.20
module load netcdf-fortran/4.4.4
module load mkl/17.0.6.256
module load hdf5/1.8.20
......@@ -92,6 +92,9 @@ write_period = 50000
# Scale factor for small planet experiment : real (default=1.)
scale_factor = 500
# Time style : [none|dcmip] (default=dcmip)
time_style = dcmip
# Initial state :
# [jablonowsky06|academic|dcmip[1-4]|heldsz|dcmip2_schaer_noshear] (default=jablonowsky06)
etat0 = dcmip2_schaer_noshear
......
......@@ -81,10 +81,10 @@ niterdivgrad = 2
#---------------- Time ----------------
# Run length in s : real (default=??)
run_length = 4.5e5
run_length = 3600
# Interval in s between two outputs : integer (default=??)
write_period = 12500
write_period = 7500
#---------------- Physical parameters ----------------
......@@ -92,6 +92,9 @@ write_period = 12500
# Scale factor for small planet experiment : real (default=1.)
scale_factor = 125
# Time style : [none|dcmip] (default=dcmip)
time_style = dcmip
# Initial state :
# [jablonowsky06|academic|dcmip[1-4]|heldsz|dcmip2_schaer_noshear] (default=jablonowsky06)
etat0 = dcmip3
......
......@@ -25,19 +25,19 @@ nsplit_j = 1
dt = 600
# Dissipation time for grad(div) : real (default=5000)
tau_graddiv = 9000
tau_graddiv = 21600
# Exponent of grad(div) disspation : integer (default=1)
nitergdiv = 2
# Dissipation time for curl(curl) : real (default=5000)
tau_gradrot = 9000
tau_gradrot = 50000
# Exponent of curl(curl) disspation : integer (default=1)
nitergrot = 2
# Dissipation time for div(grad) : real (default=5000)
tau_divgrad = 9000
tau_divgrad = 50000
# Exponent of div(grad) disspation : integer (default=1)
niterdivgrad = 2
......@@ -63,3 +63,4 @@ etat0 = dcmip4
# DCMIP 4 Test case : [1|2] (default=1)
dcmip4_testcase = 1
......@@ -3,7 +3,7 @@ INCLUDEDEF = const.def
#---------------- Mesh ----------------
# Number of subdivisions on a main triangle : integer (default=40)
nbp = 80
nbp = 32
# Number of vertical layers : integer (default=19)
llm = 30
......@@ -15,29 +15,29 @@ disvert = ncarl30
optim_it = 100
# Sub splitting of main rhombus : integer (default=1)
nsplit_i = 2
nsplit_j = 2
nsplit_i = 1
nsplit_j = 1
#---------------- Numerics ----------------
# Time step in s : real (default=480)
dt = 240
dt = 600
# Dissipation time for grad(div) : real (default=5000)
tau_graddiv = 9000
tau_graddiv = 21600
# Exponent of grad(div) disspation : integer (default=1)
nitergdiv = 2
# Dissipation time for curl(curl) : real (default=5000)
tau_gradrot = 9000
tau_gradrot = 50000
# Exponent of curl(curl) disspation : integer (default=1)
nitergrot = 2
# Dissipation time for div(grad) : real (default=5000)
tau_divgrad = 9000
tau_divgrad = 50000
# Exponent of div(grad) disspation : integer (default=1)
niterdivgrad = 2
......@@ -46,7 +46,7 @@ niterdivgrad = 2
#---------------- Time ----------------
# Run length in s : real (default=??)
run_length = 3.6e6
run_length = 864000
# Interval in s between two outputs : integer (default=??)
write_period = 21600
......
......@@ -219,7 +219,7 @@ function dcmip21
group 'Numerics' time_step 300
dissip64
group 'Time' run_length 3.6e6 write_period 50000
group 'Physical parameters' scale_factor 500 etat0 dcmip2_schaer_noshear rayleigh_friction_tau 12500 rayleigh_friction_type dcmip2_schaer_noshear
group 'Physical parameters' scale_factor 500 time_style dcmip etat0 dcmip2_schaer_noshear rayleigh_friction_tau 12500 rayleigh_friction_type dcmip2_schaer_noshear
}
function dcmip3
......@@ -228,8 +228,8 @@ function dcmip3
group 'Mesh' nbp 80 llm 10 disvert ncar ncar_dz 1000 optim_it 100 ; split 2 2
group 'Numerics' time_step 240
dissip80
group 'Time' run_length 4.5e5 write_period 12500
group 'Physical parameters' scale_factor 125 etat0 dcmip3
group 'Time' run_length 3600 write_period 7500
group 'Physical parameters' scale_factor 125 time_style dcmip etat0 dcmip3
}
# Next DCMIP test cases have rotation
......@@ -237,10 +237,10 @@ function dcmip3
function dcmip4x
{
echo 'INCLUDEDEF = const.def'
group 'Mesh' nbp 80 llm 30 disvert ncarl30 optim_it 100 ; split 2 2
group 'Numerics' time_step 240
dissip80
group 'Time' run_length 3.6e6 write_period 21600
group 'Mesh' nbp 32 llm 30 disvert ncarl30 optim_it 100 ; split 1 1
group 'Numerics' time_step 600
dissip32
group 'Time' run_length 864000 write_period 21600
group 'Physical parameters' nqtot 2 etat0 dcmip4 dcmip4_testcase $1
}
......@@ -266,7 +266,8 @@ function mkcd { cd $ROOT ; mkdir -p $1 ; cd $1
}
set -o errexit
ROOT=$PWD
ROOT=$(dirname $0)
ROOT=$(cd -P $ROOT ; pwd)
mkcd climate/Held_Suarez
held_suarez > run.def
......
......@@ -139,7 +139,7 @@ IMPLICIT NONE
real(rstd) :: height ! The height of the model levels
real(rstd) :: ptop ! Model top in p
real(rstd) :: sin_tmp, cos_tmp, sin_tmp2, cos_tmp2 ! Calculate great circle distances
real(rstd) :: d1, d2, r, r2 ! For tracer calculations
real(rstd) :: d1, d2, r, r2, d3, d4 ! For tracer calculations
real(rstd) :: s, bs ! Shape function, and parameter
real(rstd) :: lonp ! Translational longitude, depends on time
real(rstd) :: ud ! Divergent part of u
......@@ -1235,7 +1235,7 @@ IMPLICIT NONE
Peq = 100000.d0, & ! Reference PS at Equator
ztop = 10000.d0, & ! Model Top
lambdac = 2.d0*pi/3.d0, & ! Lon of Pert Center
d = 5000.d0, & ! Width for Pert
d = 625000.d0, & ! Width for Pert for X=1
phic = 0.d0, & ! Lat of Pert Center
delta_theta = 1.d0, & ! Max Amplitude of Pert
Lz = 20000.d0, & ! Vertical Wavelength of Pert
......@@ -1332,7 +1332,7 @@ IMPLICIT NONE
r = as * ACOS (sin_tmp + cos_tmp*cos(lon-lambdac))
s = (d**2)/(d**2 + r**2)
s = ((d/X)**2)/((d/X)**2 + r**2)
theta_pert = delta_theta*s*sin(2.d0*pi*height/Lz)
......
#!/bin/bash
# This script provides site-specific functions
# called by the site-independent scripts
# create_runs.sh and submit.sh
# NB : we must use the queue 'normal' because there seems to be a limit
# on the number of jobs that can be submitted to queue 'test'
#----------------------------- split_XXX ----------------------------
function split_mpi_32() {
setvar nbp 32 nsplit_i 2 nsplit_j 4
}
function split_serial_40() {
setvar nbp 40 nsplit_i 2 nsplit_j 2
}
function split_mpi_40() {
setvar nbp 40 nsplit_i 2 nsplit_j 2
}
function split_mpi_80() {
setvar nbp 80 nsplit_i 4 nsplit_j 2
}
function split_mpi_omp_40() {
setvar nbp 40 nsplit_i 2 nsplit_j 2 omp_level_size 4
}
#----------------- job submission ------------------
function submit_job_X64_IRENE() # $1=script $* = SLURM OPTIONS
{
TMP=$(mktemp)
ccc_msub $1 > $TMP
cat $TMP 1>&2
cat $TMP | awk '{print $NF }'
rm -f $TMP
}
#------------------------------ job_XXX -----------------------------
# Serial jobs
function job_serial() { # EXP_NAME
job_X64_IRENE $1 1 1 "./gcm.exe"
}
function job_serial_40() { # EXP_NAME
job_serial $1
}
# MPI jobs
function job_mpi() { #EXP_NAME NB_MPI
job_X64_IRENE $1 $2 1 "ccc_mprun ./gcm.exe"
}
function job_mpi_32() { # EXP_NAME
job_mpi $1 80
}
function job_mpi_40() { # EXP_NAME
job_mpi $1 40
}
function job_mpi_80() { # EXP_NAME
job_mpi $1 80
}
# MPI-OMP jobs
function job_mpi_omp() { #EXP_NAME NB_MPI NB_OMP
job_X64_IRENE $1 $2 $3 "ccc_mprun ./gcm.exe"
}
function job_mpi_omp_40() { # EXP_NAME
job_mpi_omp $1 40 4
}
# Generic
function job_X64_IRENE() { # EXP_NAME MPI_TASKS OMP_TASKS MPIRUN
cat <<EOF
#!/bin/bash
## Request name
#MSUB -r $1
## Number of tasks (=MPI processes) to use
#MSUB -n $2
## Number of OpenMP threads
#MSUB -c $3
## Elapsed time limit in seconds
#MSUB -T 300
# account, partition (Xeon/KNL)
#MSUB -A $project
#MSUB -q skylake
# Mount $WORK on compute node
#MSUB -m work
## Quality of Service required (long [3 days], normal [1 day], test [30 min])
#MSUB -Q normal
export OMP_NUM_THREADS=$3
export OMP_STACKSIZE=128M
ulimit -s unlimited
cd \${BRIDGE_MSUB_PWD}
$(cat $ROOT/DYNAMICO/arch/arch-X64_IRENE.env)
module list
rm -rf gcm.log logs *.nc netcdf
date > gcm.log
ulimit -s unlimited
$4 >> gcm.log
date >> gcm.log
mkdir -p netcdf
cp gcm.log *.def netcdf
mv *.nc netcdf
mkdir -p logs
cp *.xml logs
cp -pr $(readlink -e gcm.exe) logs
cp -pr $(readlink -e build/src) logs
mv xios_client_*.err xios_client_*.out gcm.log logs
EOF
}
#------------------------------ post-processing job -----------------------------
function job_post_X64_IRENE() # LIST
{
DEPLIST=afterany
for ID in $* ; do
DEPLIST="$DEPLIST:$ID"
done
cat <<EOF
#!/bin/bash
## Request name
#MSUB -r testing
#MSUB -n 1
## Elapsed time limit in seconds
#MSUB -T 600
#MSUB -q standard
#MSUB -A $project
#MSUB -q skylake
#MSUB -m work
#MSUB -E "--dependency=$DEPLIST"
## Number of tasks (=MPI processes) to use
## Quality of Service required (long [3 days], normal [1 day], test [30 min])
#MSUB -Q normal
export OMP_NUM_THREADS=1
# this script is submitted from $ROOT/logs
cd \${BRIDGE_MSUB_PWD}/..
$(cat $ROOT/DYNAMICO/arch/arch-X64_IRENE.env)
module load python
bash/post.sh
EOF
}
......@@ -10,19 +10,19 @@
#----------------------------- split_XXX ----------------------------
function split_mpi_32() {
setvar nbp 33 nsplit_i 2 nsplit_j 4
setvar nbp 32 nsplit_i 2 nsplit_j 4
}
function split_serial_40() {
setvar nbp 41 nsplit_i 2 nsplit_j 2
setvar nbp 40 nsplit_i 2 nsplit_j 2
}
function split_mpi_40() {
setvar nbp 41 nsplit_i 2 nsplit_j 2
setvar nbp 40 nsplit_i 2 nsplit_j 2
}
function split_mpi_80() {
setvar nbp 81 nsplit_i 4 nsplit_j 2
setvar nbp 80 nsplit_i 4 nsplit_j 2
}
function split_mpi_omp_40() {
setvar nbp 41 nsplit_i 2 nsplit_j 2 omp_level_size 4
setvar nbp 40 nsplit_i 2 nsplit_j 2 omp_level_size 4
}
#----------------- job submission ------------------
......@@ -79,8 +79,6 @@ function job_X64_JEANZAY() { # EXP_NAME MPI_TASKS OMP_TASKS MPIRUN
## Number of OpenMP threads
#SBATCH --cpus-per-task=$3
## computing project
#SBATCH -A wuu@cpu
## QoS for short jobs
#SBATCH --qos=qos_cpu-dev
## Elapsed time limit HH:MM:SS
......
......@@ -28,12 +28,14 @@ function build_xios()
LOGFILE=$1 ; shift
echo '# command used to build XIOS :' >> logs/build.sh
echo "./make_xios $*" >> logs/build.sh
ln -s $ROOT/DYNAMICO/arch/arch-${arch}.env $ROOT/.
cd -P $ROOT/XIOS
echo "In $PWD : Building XIOS"
echo "To watch build progress : tail -f $LOGFILE"
echo "./make_xios $*"
./make_xios $* > $LOGFILE 2>&1
./make_xios $* --full --arch_path $ROOT > $LOGFILE 2>&1
}
function main()
......
......@@ -118,7 +118,7 @@ function rundef_DCMIP21() { # NBP TAU
setvar dysl_caldyn_vert .TRUE. caldyn_vert conservative
setvar omega 0. llm 60 disvert ncar ncar_T0 300 ncar_p0 1e5 ncar_disvert_c 1 ncar_dz 500
setvar tau_graddiv $TAU tau_gradrot $TAU tau_divgrad $TAU
setvar scale_factor 500 write_period 50000 run_length 1.8e6 etat0 dcmip2_schaer_noshear
setvar scale_factor 500 time_style dcmip write_period 50000 run_length 1.8e6 etat0 dcmip2_schaer_noshear
setvar rayleigh_friction_type dcmip2_schaer_noshear rayleigh_friction_tau 12500
}
......@@ -128,7 +128,7 @@ function rundef_DCMIP31() { # NBP TAU HYDRO
setvar dysl .TRUE. hydrostatic $3
setvar omega 0. llm 10 disvert ncar ncar_T0 300 ncar_p0 1e5 ncar_disvert_c 1 ncar_dz 1118
setvar tau_graddiv $TAU tau_gradrot $TAU tau_divgrad $TAU
setvar scale_factor 125 write_period 7500 run_length 4.5e5 etat0 dcmip3
setvar scale_factor 125 time_style dcmip write_period 7500 run_length 3600 etat0 dcmip3
}
function rundef_DCMIP41() { # NBP TAU
......@@ -173,7 +173,7 @@ function rundef_bubble() { # NBP TAU
setvar llm 50 disvert ncar ncar_dz 20 ncar_T0 300 ncar_p0 1e5
# setvar time_scheme ARK2.3
setvar nitergdiv 2 nitergrot 2 niterdivgrad 2 tau_graddiv $TAU tau_gradrot $TAU tau_divgrad $TAU
setvar radius 5e6 scale_factor 10000 g 9.80616 kappa 0.2857143 cpp 1004.5 preff 1e5 omega 0.
setvar radius 5e6 scale_factor 10000 time_style dcmip g 9.80616 kappa 0.2857143 cpp 1004.5 preff 1e5 omega 0.
}
function job_bubble() { # EXEC NBP
job_$1_$2 Bubble_$1
......@@ -238,7 +238,7 @@ function main()
{
# the number associated to each run.def parameter is used to sort the lines and order them in a logical way
declare -A idx
order 100 radius omega g cpp kappa preff scale_factor
order 100 radius omega g cpp kappa preff scale_factor time_style
order 200 boussinesq hydrostatic
order 300 nbp optim_it nsplit_i nsplit_j llm omp_level_size disvert ncar_disvert_c ncar_dz ncar_T0 ncar_p0
order 400 caldyn_eta time_scheme caldyn_conserv dt nqtot itau_adv dysl dysl_caldyn_vert caldyn_vert
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment