Skip to content
Snippets Groups Projects
Commit 026dad83 authored by Guillaume Samson's avatar Guillaume Samson :snowman2: Committed by Andrew Coward
Browse files

Resolve "add C1D_PAPA reference configuration to SETTE tests"

parent acd9004a
No related branches found
No related tags found
No related merge requests found
......@@ -84,8 +84,8 @@ CONTAINS
WRITE(numout,*) '~~~~~~~~~~~ '
WRITE(numout,*) ' Namelist namusr_def : C1 case'
WRITE(numout,*) ' C1D domain = 1 x 1 x 75 grid-points '
WRITE(numout,*) ' resulting global domain size : jpiglo = ', kpi
WRITE(numout,*) ' jpjglo = ', kpj
WRITE(numout,*) ' resulting global domain size : Ni0glo = ', kpi
WRITE(numout,*) ' Nj0glo = ', kpj
WRITE(numout,*) ' jpkglo = ', kpk
WRITE(numout,*) ' '
ENDIF
......
C1D_PAPA_v4.2.0.tar.gz C1D_PAPA_v4.2.0
......@@ -63,7 +63,7 @@ LC_MESSAGES=en_US
#
# LIST OF CONFIGURATIONS
# to be updated if you added an new configuration in sette_test-cases.sh or sette_reference-configuration.sh
TEST_CONFIG_AVAILABLE=(ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF_DEMO WED025 GYRE_PISCES ORCA2_SAS_ICE ORCA2_ICE_OBS SWG ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP+)
TEST_CONFIG_AVAILABLE=(ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF_DEMO WED025 GYRE_PISCES ORCA2_SAS_ICE ORCA2_ICE_OBS C1D_PAPA SWG ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP+)
if [ -z "${TEST_CONFIGS}" ]; then
export TEST_CONFIGS=(${SETTE_TEST_CONFIGS[@]:-${TEST_CONFIG_AVAILABLE[@]}})
fi
......
......@@ -1702,6 +1702,89 @@ fi
fi
# -----------
# C1D_PAPA
# -----------
if [ ${config} == "C1D_PAPA" ] ; then
SETTE_CONFIG=${config}${SETTE_STG}
if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]]
then
ITEND=240 # 1 day
else
ITEND=87600 # 365 days
fi
ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
if [ ${DO_COMPILE} -eq 1 ] ; then
cd ${MAIN_DIR}
#
# syncronisation if target directory/file exist (not done by makenemo)
clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG}
sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG}
#
# C1D_PAPA uses linssh so remove key_qco if added by default
./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ${config} ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
## Restartability tests for C1D_PAPA
if [ ${DO_RESTART} == "1" ] ; then
export TEST_NAME="LONG"
cd ${SETTE_DIR}
. ./prepare_exe_dir.sh
set_valid_dir
clean_valid_dir
JOB_FILE=${EXE_DIR}/run_job.sh
NPROC=1
if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
cd ${EXE_DIR}
set_namelist namelist_cfg cn_exp \"C1DPAPA_LONG\"
set_namelist namelist_cfg nn_it000 1
set_namelist namelist_cfg nn_itend ${ITEND}
set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
set_namelist namelist_cfg jpni 1
set_namelist namelist_cfg jpnj 1
set_namelist namelist_cfg sn_cfctl%l_runstat .true.
set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 1
set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
set_xio_using_server iodef.xml ${USING_MPMD}
cd ${SETTE_DIR}
. ./prepare_job.sh input_${config}.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
cd ${SETTE_DIR}
export TEST_NAME="SHORT"
. ./prepare_exe_dir.sh
set_valid_dir
clean_valid_dir
cd ${EXE_DIR}
set_namelist namelist_cfg cn_exp \"C1DPAPA_SHORT\"
set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
set_namelist namelist_cfg nn_itend ${ITEND}
set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
set_namelist namelist_cfg ln_rstart .true.
set_namelist namelist_cfg nn_rstctl 2
set_namelist namelist_cfg jpni 1
set_namelist namelist_cfg jpnj 1
set_namelist namelist_cfg sn_cfctl%l_runstat .true.
set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
set_namelist namelist_cfg cn_ocerst_in \"C1DPAPA_LONG_${ITRST}_restart\"
set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 1
set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
set_xio_using_server iodef.xml ${USING_MPMD}
ln -sf ../LONG/C1DPAPA_LONG_${ITRST}_restart.nc .
cd ${SETTE_DIR}
. ./prepare_job.sh input_${config}.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
cd ${SETTE_DIR}
. ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
fi
fi
done
#
# Return to SETTE_DIR (last fcm_job.sh will have moved to EXE_DIR)
......
......@@ -655,7 +655,7 @@ do
# Reproducibility tests
echo ""
echo " !----repro----! "
for repro_test in ${TEST_CONFIGS[@]}
for repro_test in ${TEST_CONFIGS[@]/C1D_PAPA}
do
if [[ ${repro_test} != *"OVERFLOW"* && ${repro_test} != *"LOCK_EXCHANGE"* ]]; then
reprotest $NEMO_VALID $repro_test $pass
......
......@@ -274,8 +274,8 @@
DO jl = 1, ipl(jf) ; DO jk = 1, ipk(jf) ; DO jj = 1,isizej(jn,jf) ; DO ji = 1,isizei(jn,jf)
ii1 = ishti1 + ji * isgni1
ij1 = ishtj1 + jj * isgnj1
ii2 = ishti2 + ( MOD(ji-1, Ni_0) + 1 ) * isgni2 ! warning: Ni_0 my be smaller than isizei(jn,jf)
ij2 = ishtj2 + ( MOD(jj-1, Nj_0) + 1 ) * isgnj2 ! warning: Nj_0 my be smaller than isizej(jn,jf)
ii2 = ishti2 + ( MOD(ji-1, Ni_0) + 1 ) * isgni2 ! warning: Ni_0 might be smaller than isizei(jn,jf)
ij2 = ishtj2 + ( MOD(jj-1, Nj_0) + 1 ) * isgnj2 ! warning: Nj_0 might be smaller than isizej(jn,jf)
ptab(jf)%pt4d(ii1,ij1,jk,jl) = ptab(jf)%pt4d(ii2,ij2,jk,jl)
END DO ; END DO ; END DO ; END DO
!
......
......@@ -344,8 +344,8 @@
DO jl = 1, ipl(jf) ; DO jk = 1, ipk(jf) ; DO jj = 1,isizej(jn,jf) ; DO ji = 1,isizei(jn,jf)
ii1 = ishti1 + ji * isgni1
ij1 = ishtj1 + jj * isgnj1
ii2 = ishti2 + ( MOD(ji-1, iisz) + 1 ) * isgni2 ! warning: iisz my be smaller than isizei(jn,jf)
ij2 = ishtj2 + ( MOD(jj-1, Nj_0) + 1 ) * isgnj2 ! warning: Nj_0 my be smaller than isizej(jn,jf)
ii2 = ishti2 + ( MOD(ji-1, iisz) + 1 ) * isgni2 ! warning: iisz might be smaller than isizei(jn,jf)
ij2 = ishtj2 + ( MOD(jj-1, Nj_0) + 1 ) * isgnj2 ! warning: Nj_0 might be smaller than isizej(jn,jf)
ptab(jf)%pt4d(ii1,ij1,jk,jl) = ptab(jf)%pt4d(ii2,ij2,jk,jl)
END DO ; END DO ; END DO ; END DO
!
......
......@@ -630,7 +630,7 @@ CONTAINS
#else
klci(1:iresti ,:) = kimax
klci(iresti+1:knbi ,:) = kimax-1
IF( MINVAL(klci) < 3*khls ) THEN
IF( MINVAL(klci) < 3*khls .AND. knbi > 1 ) THEN ! if we do MPI communications along i (knbi > 1)
WRITE(ctmp1,*) ' mpp_basesplit: minimum value of jpi must be >= ', 3*khls
WRITE(ctmp2,*) ' We have ', MINVAL(klci)
CALL ctl_stop( 'STOP', ctmp1, ctmp2 )
......@@ -648,7 +648,7 @@ CONTAINS
klcj(:, irestj+1:knbj ) = kjmax-1
ENDIF
klcj(:,1:irestj) = kjmax
IF( MINVAL(klcj) < 3*khls ) THEN
IF( MINVAL(klcj) < 3*khls .AND. knbj > 1 ) THEN ! if we do MPI communications along j (knbj > 1)
WRITE(ctmp1,*) ' mpp_basesplit: minimum value of jpj must be >= ', 3*khls
WRITE(ctmp2,*) ' We have ', MINVAL(klcj)
CALL ctl_stop( 'STOP', ctmp1, ctmp2 )
......@@ -775,13 +775,26 @@ CONTAINS
ENDIF
ENDIF
END DO
IF( inbimax == 0 ) THEN
WRITE(ctmp1,'(a,i2,a,i2)') ' mpp_ini bestpartition: Ni0glo (', Ni0glo, ') is too small to be used with nn_hls = ', nn_hls
CALL ctl_stop( 'STOP', ctmp1 )
! The domain is too small to cut it along the i direction. ==> force jpni = 1.
! Note: halos larger than the inner domain along i: lbc_lnk OK if there is no MPI communications along i direction
WRITE(ctmp1,'(a,i2,a,i2)') &
& ' mpp_ini bestpartition: Ni0glo (',Ni0glo,') is too small to cut the domain with nn_hls = ', nn_hls
CALL ctl_warn( ctmp1, ' We force jpni = 1 (no domain decomposition along i)' )
inbimax = 1 ! only 1 case possible:
inbi0(inbimax) = 1 ! only 1 domain along i
iszi0(inbimax) = Ni0glo + 2*nn_hls ! total domain size along i when there is no domain decomposition
ENDIF
IF( inbjmax == 0 ) THEN
WRITE(ctmp1,'(a,i2,a,i2)') ' mpp_ini bestpartition: Nj0glo (', Nj0glo, ') is too small to be used with nn_hls = ', nn_hls
CALL ctl_stop( 'STOP', ctmp1 )
! The domain is too small to cut it along the j direction. ==> force jpnj = 1.
! Note: halos larger than the inner domain along j: lbc_lnk OK if there is no MPI communications along j direction
WRITE(ctmp1,'(a,i2,a,i2)') &
& ' mpp_ini bestpartition: Nj0glo (',Nj0glo,') is too small to cut the domain with nn_hls = ', nn_hls
CALL ctl_warn( ctmp1, ' We force jpnj = 1 (no domain decomposition along j)' )
inbjmax = 1 ! only 1 case possible:
inbj0(inbjmax) = 1 ! only 1 domain along j
iszj0(inbjmax) = Nj0glo + 2*nn_hls ! total domain size along j when there is no domain decomposition
ENDIF
! combine these 2 lists to get all possible knbi*knbj < inbijmax
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment