Commit 86952760 authored by Rafał Lalik's avatar Rafał Lalik
Browse files

Add out subdir to input list

parent 6f472aa7
......@@ -9,24 +9,29 @@ echo " odir=$odir"
if [[ -n ${SLURM_ARRAY_TASK_ID} ]]; then
echo "ARRAY: ${SLURM_ARRAY_TASK_ID} in ${pattern}"
file=$(sed -n $((${SLURM_ARRAY_TASK_ID}+1))p ${pattern})
line=$(sed -n $((${SLURM_ARRAY_TASK_ID}+1))p ${pattern})
IFS=' ' read -ra linearr <<< "$line"
file=${linearr[0]}
sodir=${linearr[1]}
else
echo "NO ARRAY"
file=$pattern
fi
. /lustre/hades/user/rlalik/hades/profile_feb22.sh
[ -e job_profile.sh ] && . job_profile.sh
cd /lustre/hades/user/rlalik/hades/feb22/sim/geant
odir=$(readlink -e $odir)
mkdir $odir
mkdir -p $odir/$sodir
odir=$(readlink -e $odir/$sodir)
#file=$(readlink -e $file)
echo file=$file
echo events=$events
echo odir=$odir
crashfile=$odir/crash_await_${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}.txt
echo $file > $crashfile
root -b -q
card_file_base=simul_p4500p_fwdet_feb22
......@@ -37,11 +42,18 @@ date
truncate -s0 ${odir}/$(basename ${file} .evt)_1.root
# update placeholders and generate temporary file
echo "*********************************************"
echo "*********************************************"
sed \
-e "s|@wd@|$(pwd)|g" \
-e "s|@input@|${file}|" \
-e "s|@output@|$(basename ${file} .evt)_.root|" \
${card_file_base}.dat > ${card_file}
${card_file_base}.dat | tee ${card_file}
echo "*********************************************"
echo "*********************************************"
if [ -z ${SLURM_TMPDIR+x} ]; then
echo "SLURM_TMPDIR is unset"
......@@ -64,12 +76,7 @@ fi
mv $(basename ${file} .evt)_*.root ${odir}/ -v
echo "*********************************************"
cat ${card_file}
echo "*********************************************"
cat ${card_file}
cd -
rm -rfv ${tmpdirname}
rm -fv ${card_file}
rm -v $crashfile
Supports Markdown
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