Commit c9a815f5 authored by Maiken's avatar Maiken

Merge branch 'community-multi-sw-dir' into 'master'

Proper support for multiple community RTEs software dirs

See merge request nordugrid/arc!980
parents d065297c b5e64292
Pipeline #7702 passed with stages
in 143 minutes and 39 seconds
......@@ -11,18 +11,24 @@ community_software_prepare () {
echo "ERROR: SOFTWARE_DIR is not defined for ${rte_name} community RTE. Failed to prepare software files." 1>&2
exit 1
fi
# software location in the sessiondir
RUNTIME_SOFTWARE_DIR="${joboption_directory}/${COMMUNITY_RTES_SW_SUBDIR}/${rte_name}"
mkdir -p "${RUNTIME_SOFTWARE_DIR%/*}"
# copy software if not shared, link if shared
if [ "$SOFTWARE_SHARED" != "True" ]; then
echo "Copying community software for RTE ${rte_name} into job directory." 1>&2
cp -rv "${SOFTWARE_DIR}" ${joboption_directory}/${COMMUNITY_RTES_SW_SUBDIR}
echo "Copying community software for RTE ${rte_name} into job directory." 1>&2
cp -rv "${SOFTWARE_DIR}" "${RUNTIME_SOFTWARE_DIR}"
else
echo "Linking community software for RTE ${rte_name} into job directory." 1>&2
ln -sf "${SOFTWARE_DIR}" ${joboption_directory}/${COMMUNITY_RTES_SW_SUBDIR}
echo "Linking community software for RTE ${rte_name} into job directory." 1>&2
ln -sf "${SOFTWARE_DIR}" "${RUNTIME_SOFTWARE_DIR}"
fi
# define ${RUNTIME_JOB_SWDIR} for RTE stage 0
RUNTIME_JOB_SWDIR="\${RUNTIME_JOB_DIR}/${COMMUNITY_RTES_SW_SUBDIR}/${rte_name}"
}
community_software_environment () {
# skip if this is not a community-defined RTE
[ -e "${rte_params_path}.community" ] || return
echo "RUNTIME_JOB_SWDIR=\"\${RUNTIME_JOB_DIR}/${COMMUNITY_RTES_SW_SUBDIR}\""
# define RUNTIME_JOB_SWDIR for RTE stage 1/2 in the jobscript
echo "RUNTIME_JOB_SWDIR=\"\${RUNTIME_JOB_DIR}/${COMMUNITY_RTES_SW_SUBDIR}/${rte_name}\""
}
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