From d7866c037e29ba558a45b7eb8c7d2446aaf4f330 Mon Sep 17 00:00:00 2001 From: "Takumi.Matsunobu" <Takumi.Matsunobu@physik.uni-muenchen.de> Date: Fri, 6 Oct 2023 11:21:51 +0200 Subject: [PATCH] transfer option --- templates/common/transfer.sh | 2 ++ templates/common/transfer_project.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/templates/common/transfer.sh b/templates/common/transfer.sh index 1081fce..24a7386 100644 --- a/templates/common/transfer.sh +++ b/templates/common/transfer.sh @@ -17,6 +17,7 @@ DESTINATION_DIR=${MAIN_LOCAL_FOLDER}/${STARTDATE}/${MEMBER} mkdir -p ${DESTINATION_DIR} +if [ "%data_management.local_destination_folder%" = "True" ]; then if [[ "x$HPCHOST" == "xlocalhost" ]]; then for file_name in ${OUTPUT_FILES}; do rsync -v ${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR} @@ -27,3 +28,4 @@ else rsync -v ${HPCUSER}@${HPCHOST}:${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR} done fi +fi \ No newline at end of file diff --git a/templates/common/transfer_project.sh b/templates/common/transfer_project.sh index 5b90394..554153d 100644 --- a/templates/common/transfer_project.sh +++ b/templates/common/transfer_project.sh @@ -10,6 +10,8 @@ REMOTE_WORKDIR=${WORKDIR}/ PROJ_FOLDER="%PROJDIR%" # Transfer the project + +if [ "%data_management.local_destination_folder%" = "True" ]; then if [[ "x$HPCHOST" == "xlocalhost" ]]; then mkdir -p ${REMOTE_WORKDIR}/proj rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${REMOTE_WORKDIR}/proj @@ -17,3 +19,4 @@ else ssh ${HPCUSER}@${HPCHOST} mkdir -p ${REMOTE_WORKDIR}/proj rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${HPCUSER}@${HPCHOST}:${REMOTE_WORKDIR}/proj fi +fi \ No newline at end of file -- GitLab