Skip to content
Snippets Groups Projects
Commit e7737338 authored by Guillaume Samson's avatar Guillaume Samson :snowman2:
Browse files

Merge branch...

Merge branch '84-add-the-possibility-to-generate-bld-directory-outside-config-directory-when-using-sette' into 'main'

Resolve "add the possibility to generate BLD directory outside CONFIG directory when using SETTE"

Closes #84

See merge request nemo/nemo!132
parents cdd23f30 40c83a23
No related branches found
No related tags found
No related merge requests found
......@@ -153,12 +153,12 @@ clean_config() {
echo '-------------------------------------------------------------------------------'
echo ' CLEANING CONFIGURATION '
echo ''
echo "./makenemo -n $lCFG -a/-r $lREF clean"
echo "./makenemo -n $lCFG -a/-r $lREF -t ${CMP_DIR:-${CONFIG_DIR0}} clean"
echo ''
if [ ${lTYP} == 'tests' ]; then
./makenemo -n $lCFG -a $lREF clean
./makenemo -n $lCFG -t ${CMP_DIR:-${CONFIG_DIR0}} -a $lREF clean
elif [ ${lTYP} == 'cfgs' ]; then
./makenemo -n $lCFG -r $lREF clean
./makenemo -n $lCFG -t ${CMP_DIR:-${CONFIG_DIR0}} -r $lREF clean
else
echo 'ERROR in the cleaning process'; exit 42
fi
......@@ -172,7 +172,7 @@ clean_config() {
# define validation dir
set_valid_dir () {
if [ ${DETACHED_HEAD} == "no" ] ; then
REVISION_NB=`git -C ${MAIN_DIR} rev-list --abbrev-commit origin | head -1l`
REVISION_NB=`git -C ${MAIN_DIR} rev-list --abbrev-commit HEAD | head -1l`
else
REVISION_NB=${DETACHED_CMIT}
fi
......
......@@ -69,7 +69,6 @@ set -o posix
if [ -z "${CUSTOM_DIR}" ]; then
export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
else
NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null )
export EXE_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}/${NEW_CONF}/${TEST_NAME}
fi
mkdir -p ${EXE_DIR}
......
......@@ -110,8 +110,12 @@ fi
# Directory to run the tests
CONFIG_DIR0=${MAIN_DIR}/cfgs
TOOLS_DIR=${MAIN_DIR}/tools
if [ -n "${CUSTOM_DIR}" ]; then
NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null )
CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}
fi
CMP_NAM=${1:-$COMPILER}
# Copy job_batch_COMPILER file for specific compiler into job_batch_template
cd ${SETTE_DIR}
cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
......@@ -149,7 +153,7 @@ if [ ${config} == "GYRE_PISCES" ] ; then
clean_config GYRE_PISCES ${SETTE_CONFIG} 'cfgs'
#
# GYRE uses linssh so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r GYRE_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r GYRE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for GYRE_PISCES
......@@ -295,7 +299,7 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] ; then
sync_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs'
clean_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for ORCA2_ICE_PISCES
......@@ -583,7 +587,7 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] ; then
clean_config ${SETTE_CONFIG} ORCA2_OFF_PISCES_ST 'cfgs'
#
# ORCA2_OFF_PISCES uses linssh so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_OFF_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_OFF_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for ORCA2_OFF_PISCES
......@@ -759,7 +763,7 @@ if [ ${config} == "AMM12" ] ; then
sync_config AMM12 ${SETTE_CONFIG} 'cfgs'
clean_config AMM12 ${SETTE_CONFIG} 'cfgs'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AMM12 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AMM12 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for AMM12
......@@ -894,7 +898,7 @@ if [ ${config} == "SAS" ] ; then
clean_config ORCA2_SAS_ICE ${SETTE_CONFIG} 'cfgs'
#
# ORCA2_SAS_ICE uses linssh so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_SAS_ICE -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_SAS_ICE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "SAS" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests
......@@ -1041,7 +1045,7 @@ if [ ${config} == "ORCA2_ICE_OBS" ] ; then
sync_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs'
clean_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -d "OCE ICE" -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -d "OCE ICE" -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}"
fi
if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ; then
## Reproducibility tests
......@@ -1167,7 +1171,7 @@ if [ ${config} == "AGRIF" ] ; then
#
# AGRIF_DEMO does not yet support nn_hls=2 => key_loop_fusion can not be used
# . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests
......@@ -1483,7 +1487,7 @@ if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ; then
clean_config AGRIF_DEMO ${SETTE_CONFIG} 'cfgs'
#
# AGRIF_DEMO does not yet support nn_hls=2 => key_loop_fusion can not be used
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "key_agrif ${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "key_agrif ${DEL_KEYS}"
cd ${SETTE_DIR}
. ./prepare_exe_dir.sh
set_valid_dir
......@@ -1531,7 +1535,7 @@ if [ ${config} == "WED025" ] ; then
clean_config WED025 ${SETTE_CONFIG} 'cfgs'
#
# WED025 uses ln_hpg_isf so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r WED025 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r WED025 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests
......
......@@ -111,6 +111,10 @@ fi
CONFIG_DIR0=${MAIN_DIR}/cfgs
TOOLS_DIR=${MAIN_DIR}/tools
if [ -n "${CUSTOM_DIR}" ]; then
NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null )
CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}
fi
CMP_NAM=${1:-$COMPILER}
# Copy job_batch_COMPILER file for specific compiler into job_batch_template
cd ${SETTE_DIR}
......@@ -149,7 +153,7 @@ if [ ${config} == "OVERFLOW" ] ; then
#
sync_config OVERFLOW ${SETTE_CONFIG} 'tests'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for OVERFLOW
......@@ -266,7 +270,7 @@ if [ ${config} == "LOCK_EXCHANGE" ] ; then
#
sync_config LOCK_EXCHANGE ${SETTE_CONFIG} 'tests'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a LOCK_EXCHANGE -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a LOCK_EXCHANGE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for LOCK_EXCHANGE
......@@ -385,7 +389,7 @@ if [ ${config} == "VORTEX" ] ; then
#
sync_config VORTEX ${SETTE_CONFIG} 'tests'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for VORTEX
......@@ -580,7 +584,7 @@ if [ ${config} == "ICE_AGRIF" ] ; then
sync_config ICE_AGRIF ${SETTE_CONFIG} 'tests'
#
# ICE_AGRIF uses linssh so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ICE_AGRIF -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ICE_AGRIF -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests for ICE_AGRIF
......@@ -778,7 +782,7 @@ if [ ${config} == "ISOMIP+" ] ; then
sync_config ISOMIP+ ${SETTE_CONFIG} 'tests'
#
# ISOMIP+ uses ln_hpg_isf so remove key_qco if added by default
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ISOMIP+ -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ISOMIP+ -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then
## Restartability tests
......@@ -922,7 +926,7 @@ if [ ${config} == "SWG" ] && [ ${USING_QCO} == "yes" ] ; then
#
sync_config SWG ${SETTE_CONFIG} 'tests'
#
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a SWG -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
. ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a SWG -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
fi
if [ ${config} == "SWG" ] && [ ${DO_RESTART} == "1" ] && [ ${USING_QCO} == "yes" ] ; then
## Restartability tests for SWG
......
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