Commit bb1c829b authored by Christian Meesters's avatar Christian Meesters

dropped sbcast in favour of dd (host based auth should always work)

parent 6b266777
......@@ -32,9 +32,13 @@ module purge
# load the most current version of GNU parallel
module load tools/parallel/20181122
#4 make the return value of the last pipe command which fails the return value
# make the return value of the last pipe command which fails the return value
set -o pipefail
set -e
# trace the timing
#PS4='+ $(date "+%s.%N")\011 '
#exec 3>&2 2>$HOME/bashstart.$$.log
#set -x
# which cluster are we on
cluster=$(sacctmgr show cluster -p| tail -n1| cut -f1 -d '|')
......@@ -636,7 +640,6 @@ else
nodes=15
fi
fi
#check if this script is on node by checking env-variable $SLURM_JOB_ID, else send it to SLURM with given parameters and exit
if [ -z "$SLURM_JOB_ID" ]; then
submit_statement="sbatch --no-requeue -o ${_arg_outdir}/${_arg_tag}.log -J $_arg_tag -p $_arg_queue -A $_arg_assoc -c $threads -t $_arg_runlimit -N $nodes --ntasks-per-node=$((64 / $threads)) --distribution=block:cyclic"
......@@ -705,9 +708,7 @@ fi
# special case: STAR - we do not need the ramdisk, but expose the reference in shared memory
#if [ "STAR" = "$executable" ]; then
# module load bio/STAR
#srun --exclusive -N $SLURM_JOB_NUM_NODES -n $SLURM_JOB_NUM_NODES --ntasks-per-node=1 --cpus-per-task=1 --mem=${SLURM_MEM_PER_NODE} --mem_bind=verbose --cpu_bind=verbose STAR --runThreadN 1 --outFileNamePrefix ${_arg_outdir}/${SLURM_JOB_ID} --genomeLoad LoadAndExit --genomeDir ${_arg_reference}
# srun --exclusive -N $SLURM_JOB_NUM_NODES -n $SLURM_JOB_NUM_NODES --ntasks-per-node=1 --cpus-per-task=1 --mem=${SLURM_MEM_PER_NODE} --mem_bind=verbose --cpu_bind=verbose STAR --runThreadN 1 --outFileNamePrefix /localscratch/${SLURM_JOB_ID}/ --genomeLoad LoadAndExit --genomeDir ${_arg_reference}
# sleep 2
#fi
JOBDIR=/localscratch/$SLURM_JOB_ID
......@@ -721,29 +722,21 @@ QUEUE=''
### check which copying scheme we need to use
if [[ "STAR" != "$executable" ]]; then
# number of public keys on $HOME
npubkeys=$(find ${HOME}/.ssh -name '*pub' | wc -l)
#if [ $npubkeys -eq 0 ]; then
if [ 1 -eq 1 ]; then
warning "No public key found: stage-in process will be slow."
# start with stageing-in the reference to all nodes
# TODO: change to ONLY sbcast, once performant
HOSTLIST=$(scontrol show hostname $SLURM_JOB_NODELIST | paste -d, -s | tr ',', ' ')
for HOST in $HOSTLIST; do
for fname in ${_arg_reference}/*; do
set -x
sbcast $fname ${RAMDISK}/. &
PID=$!
set +x
queue $PID
done
else
# TODO: change to ONLY sbcast, once performant
HOSTLIST=$(scontrol show hostname $SLURM_JOB_NODELIST | paste -d, -s | tr ',', ' ')
for HOST in $HOSTLIST; do
# when copying dereference putative links!
eval "ssh $HOST cp -Lr ${_arg_reference} $RAMDISK/. &"
PID=$!
queue $PID
if [ -L "$fname" ]; then
eval "ssh $HOST cp -L $fname ${RAMDISK}/$(basename $fname)" &
PID=$!
queue $PID
else
eval "ssh $HOST dd bs=4096 if=$fname of=${RAMDISK}/$(basename $fname)" &
PID=$!
queue $PID
fi
done
fi
done
### take on new reference, now, that we know it is on the ramdisk
### we have a new reference location
location=${RAMDISK}/$(basename $_arg_reference)
......
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