Commit c5018e72 authored by Maiken's avatar Maiken

Merge branch 'bugz-3239' into 'master'

BUGZ-3239 add extra scratchdir option for copy to scratch tool

See merge request nordugrid/arc!1034
parents b1b17d31 8892c6c0
Pipeline #8570 failed with stages
in 68 minutes and 16 seconds
......@@ -532,6 +532,14 @@
#gnu_time=/usr/bin/time
## CHANGE: MOVED in 6.0.0 from the [arex] block.
## movetool = comand - Redefine the command used to move files during jobscript
## execution on LRMS worker node (the command should be available on WNs).
## This in particular applies to files movement from sessiondir to scratchdir
## in the shared sessiondir case.
## default: mv
#movetool=rsync -av
## CHANGE: NEW in 6.8
### PBS options: set these only in case of lrms=pbs
## pbs_bin_path = path - The path to the qstat,pbsnodes,qmgr etc PBS binaries,
## no need to set if PBS is not used
......
......@@ -200,7 +200,11 @@ watcher() {
#######################################
# Submit the job
#######################################
echo "job script ${LRMS_JOB_SCRIPT} built" 1>&2
echo "job script ${LRMS_JOB_SCRIPT} built:" 1>&2
echo "-------------------------------------------------------------------" 1>&2
cat "$LRMS_JOB_SCRIPT" 1>&2
echo "-------------------------------------------------------------------" 1>&2
echo "" 1>&2
# simple queuing system: make hard reference to the queue
cd "$joboption_directory" 1>&2 || { echo "Could not cd to $joboption_directory, aborting" && exit 1; }
......
......@@ -25,7 +25,7 @@ parse_arc_conf () {
# [arex] block needed for directories setup
arex_options="controldir scratchdir shared_filesystem shared_scratch runtimedir"
# [lrms] block for most of configuration
lrms_options="gnu_time nodename defaultmemory benchmark $lrms_options"
lrms_options="gnu_time nodename defaultmemory benchmark movetool $lrms_options"
# [queue] section is relevant to fetch per-queue memory limits, benchmarks and customizations
queue_options="defaultmemory benchmark $queue_options"
......@@ -113,6 +113,7 @@ init_lrms_env () {
RUNTIME_FRONTEND_SEES_NODE=$CONFIG_shared_scratch
RUNTIME_NODE_SEES_FRONTEND=$CONFIG_shared_filesystem
RUNTIME_LOCAL_SCRATCH_DIR=$CONFIG_scratchdir
RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=${CONFIG_movetool:-mv}
#default is NFS
if [ -z "${RUNTIME_NODE_SEES_FRONTEND}" ] ; then
......
......@@ -78,6 +78,7 @@ if [ ! -z "$RUNTIME_GRIDAREA_DIR" ] ; then
RUNTIME_CONTROL_DIR=`echo "$RUNTIME_CONTROL_DIR" | sed "s#^$RUNTIME_JOB_DIR#$RUNTIME_GRIDAREA_DIR#"`
fi
RUNTIME_LOCAL_SCRATCH_DIR=${RUNTIME_LOCAL_SCRATCH_DIR:-}
RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=${RUNTIME_LOCAL_SCRATCH_MOVE_TOOL:-mv}
RUNTIME_FRONTEND_SEES_NODE=${RUNTIME_FRONTEND_SEES_NODE:-}
RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-yes}
if [ ! -z "$RUNTIME_LOCAL_SCRATCH_DIR" ] && [ ! -z "$RUNTIME_NODE_SEES_FRONTEND" ]; then
......@@ -91,8 +92,8 @@ RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-yes}
[ "$f" = "$RUNTIME_JOB_DIR/.." ] && continue
[ "$f" = "$RUNTIME_JOB_DIR/.diag" ] && continue
[ "$f" = "$RUNTIME_JOB_DIR/.comment" ] && continue
if ! mv "$f" "$RUNTIME_NODE_JOB_DIR"; then
echo "Failed to move '$f' to '$RUNTIME_NODE_JOB_DIR'" 1>&2
if ! $RUNTIME_LOCAL_SCRATCH_MOVE_TOOL "$f" "$RUNTIME_NODE_JOB_DIR"; then
echo "Failed to '$RUNTIME_LOCAL_SCRATCH_MOVE_TOOL' '$f' to '$RUNTIME_NODE_JOB_DIR'" 1>&2
exit 1
fi
done
......
......@@ -9,7 +9,7 @@
#SBATCH
# Overide umask of execution node (sometime values are really strange)
@@ -64,22 +64,14 @@
@@ -64,23 +64,15 @@
export 'GRID_GLOBAL_JOBINTERFACE='
export 'GRID_GLOBAL_JOBHOST='
......@@ -33,13 +33,14 @@
+RUNTIME_JOB_STDOUT="/dev/null"
+RUNTIME_JOB_STDERR="/dev/null"
+RUNTIME_LOCAL_SCRATCH_DIR=${RUNTIME_LOCAL_SCRATCH_DIR:-/local/scratch}
RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=${RUNTIME_LOCAL_SCRATCH_MOVE_TOOL:-mv}
RUNTIME_FRONTEND_SEES_NODE=${RUNTIME_FRONTEND_SEES_NODE:-}
-RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-yes}
+RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-}
if [ ! -z "$RUNTIME_LOCAL_SCRATCH_DIR" ] && [ ! -z "$RUNTIME_NODE_SEES_FRONTEND" ]; then
RUNTIME_NODE_JOB_DIR="$RUNTIME_LOCAL_SCRATCH_DIR"/`basename "$RUNTIME_JOB_DIR"`
rm -rf "$RUNTIME_NODE_JOB_DIR"
@@ -140,8 +135,21 @@
@@ -141,8 +136,21 @@
RESULT=0
if [ "$RESULT" = '0' ] ; then
......@@ -61,7 +62,7 @@
echo "runtimeenvironments=$runtimeenvironments" >> "$RUNTIME_JOB_DIAG"
if [ ! "X$SLURM_NODEFILE" = 'X' ] ; then
if [ -r "$SLURM_NODEFILE" ] ; then
@@ -181,7 +189,7 @@
@@ -182,7 +190,7 @@
nodename=`/bin/hostname -f`
echo "nodename=$nodename" >> "$RUNTIME_JOB_DIAG"
fi
......@@ -70,7 +71,7 @@
echo "Benchmark=HEPSPEC:1.0" >> "$RUNTIME_JOB_DIAG"
executable='/bin/true'
# Check if executable exists
@@ -211,6 +219,15 @@
@@ -212,6 +220,15 @@
fi
# Running RTE scripts (stage 2)
runtimeenvironments=
......
......@@ -24,6 +24,7 @@
+RUNTIME_JOB_STDOUT="/dev/null"
+RUNTIME_JOB_STDERR="/dev/null"
+RUNTIME_LOCAL_SCRATCH_DIR=${RUNTIME_LOCAL_SCRATCH_DIR:-/local/scratch}
RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=${RUNTIME_LOCAL_SCRATCH_MOVE_TOOL:-mv}
RUNTIME_FRONTEND_SEES_NODE=${RUNTIME_FRONTEND_SEES_NODE:-}
-RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-yes}
+RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-}
......
--- a/basic-script.sh 2014-01-28 11:18:43.152122917 +0100
+++ b/basic-script.sh 2014-01-28 11:18:43.144122917 +0100
@@ -64,22 +64,14 @@
@@ -64,23 +64,15 @@
export 'GRID_GLOBAL_JOBINTERFACE='
export 'GRID_GLOBAL_JOBHOST='
......@@ -24,13 +24,14 @@
+RUNTIME_JOB_STDOUT="/local/scratch/@TEST_JOB_ID@/out"
+RUNTIME_JOB_STDERR="/local/scratch/@TEST_JOB_ID@/error"
+RUNTIME_LOCAL_SCRATCH_DIR=${RUNTIME_LOCAL_SCRATCH_DIR:-/local/scratch}
RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=${RUNTIME_LOCAL_SCRATCH_MOVE_TOOL:-mv}
RUNTIME_FRONTEND_SEES_NODE=${RUNTIME_FRONTEND_SEES_NODE:-}
-RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-yes}
+RUNTIME_NODE_SEES_FRONTEND=${RUNTIME_NODE_SEES_FRONTEND:-}
if [ ! -z "$RUNTIME_LOCAL_SCRATCH_DIR" ] && [ ! -z "$RUNTIME_NODE_SEES_FRONTEND" ]; then
RUNTIME_NODE_JOB_DIR="$RUNTIME_LOCAL_SCRATCH_DIR"/`basename "$RUNTIME_JOB_DIR"`
rm -rf "$RUNTIME_NODE_JOB_DIR"
@@ -201,9 +193,9 @@
@@ -202,9 +194,9 @@
echo "Cannot run $executable: $interpreter: not found" 1>$RUNTIME_JOB_STDOUT 2>$RUNTIME_JOB_STDERR 1>&2
exit 1; }
if [ "x$JOB_ACCOUNTING" = "xgnutime" ]; then
......
......@@ -489,6 +489,7 @@ move_files_to_node () {
else
echo "RUNTIME_LOCAL_SCRATCH_DIR=\${RUNTIME_LOCAL_SCRATCH_DIR:-}" >> $LRMS_JOB_SCRIPT
fi
echo "RUNTIME_LOCAL_SCRATCH_MOVE_TOOL=\${RUNTIME_LOCAL_SCRATCH_MOVE_TOOL:-$RUNTIME_LOCAL_SCRATCH_MOVE_TOOL}" >> $LRMS_JOB_SCRIPT
echo "RUNTIME_FRONTEND_SEES_NODE=\${RUNTIME_FRONTEND_SEES_NODE:-$RUNTIME_FRONTEND_SEES_NODE}" >> $LRMS_JOB_SCRIPT
echo "RUNTIME_NODE_SEES_FRONTEND=\${RUNTIME_NODE_SEES_FRONTEND:-$RUNTIME_NODE_SEES_FRONTEND}" >> $LRMS_JOB_SCRIPT
cat >> $LRMS_JOB_SCRIPT <<'EOSCR'
......@@ -503,8 +504,8 @@ move_files_to_node () {
[ "$f" = "$RUNTIME_JOB_DIR/.." ] && continue
[ "$f" = "$RUNTIME_JOB_DIR/.diag" ] && continue
[ "$f" = "$RUNTIME_JOB_DIR/.comment" ] && continue
if ! mv "$f" "$RUNTIME_NODE_JOB_DIR"; then
echo "Failed to move '$f' to '$RUNTIME_NODE_JOB_DIR'" 1>&2
if ! $RUNTIME_LOCAL_SCRATCH_MOVE_TOOL "$f" "$RUNTIME_NODE_JOB_DIR"; then
echo "Failed to '$RUNTIME_LOCAL_SCRATCH_MOVE_TOOL' '$f' to '$RUNTIME_NODE_JOB_DIR'" 1>&2
exit 1
fi
done
......
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