Skip to content
Snippets Groups Projects
Commit 5f77f29c authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Modify transfer.sh to move things from remote to local.

parent 69d61014
No related branches found
No related tags found
No related merge requests found
...@@ -5,15 +5,19 @@ WORKDIR=%HPCROOTDIR% ...@@ -5,15 +5,19 @@ WORKDIR=%HPCROOTDIR%
STARTDATE=%SDATE% STARTDATE=%SDATE%
MEMBER=%MEMBER% MEMBER=%MEMBER%
OUTPUT_FILES="%simulation.OUTPUT_FILES%" OUTPUT_FILES="%simulation.OUTPUT_FILES%"
HPCUSER=%HPCUSER%
HPCHOST=%HPCHOST%
# Define rundir # Define output dir in remote machine
RUNDIR=${WORKDIR}/${STARTDATE}/${MEMBER}
# Define output dir and create it in case it doesn't exist
OUTPUT_DIR=${WORKDIR}/output/${STARTDATE}/${MEMBER} OUTPUT_DIR=${WORKDIR}/output/${STARTDATE}/${MEMBER}
mkdir -p ${OUTPUT_DIR}
MAIN_LOCAL_FOLDER=%data_management.local_folder%/%DEFAULT.EXPID%
DESTINATION_DIR=${MAIN_LOCAL_FOLDER}/${STARTDATE}/${MEMBER}
mkdir -p ${DESTINATION_DIR}
# Copy the output files # Copy the output files
for file_name in ${OUTPUT_FILES}; do for file_name in ${OUTPUT_FILES}; do
rsync ${RUNDIR}/${file_name} ${OUTPUT_DIR} rsync -v ${HPCUSER}@${HPCHOST}:${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR}
done done
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