33 lines
1.3 KiB
Bash
33 lines
1.3 KiB
Bash
#!/bin/bash
|
|
###############################################
|
|
# A script to run (N-1) MUSIC Hydro events #
|
|
# #
|
|
# argument $1 = N #
|
|
# Code checks if event exists and if not #
|
|
# submits a single event script to sbatch #
|
|
###############################################
|
|
|
|
counter=1
|
|
requiredFile="epsilon-u-Hydro-t0.6-0.dat" ## file with Glasma initial conditions
|
|
testFile="surface_eps_0.3147.dat" ## surface file - check name! (same in all events)
|
|
|
|
until [ $counter -gt $1 ] ## loop pver N-1 events
|
|
do
|
|
#echo Count $counter
|
|
checkDir=/lustre/alice/users/jcrkovsk/IPGlasmaEvents/Event$counter/Hydro06
|
|
aboveDir=/lustre/alice/users/jcrkovsk/IPGlasmaEvents/Event$counter
|
|
if [[ ! -d "$checkDir" ]]; then ## check existence of HydroXX folder
|
|
echo "Creating directory ${checkDir}"
|
|
mkdir ${checkDir}
|
|
fi
|
|
if [[ -f "${aboveDir}/${requiredFile}" ]]; then ## if THERE IS init. cond. file in the workdir
|
|
if [[ ! -f "${checkDir}/${testFile}" ]]; then ## if NO surface file in the workdir
|
|
sbatch --job-name 06H$counter --time=8:00:00 singleEventHydro.sh $counter ## submits a job
|
|
fi
|
|
else
|
|
echo "Counter $counter: Missing IPGlasma files!!!" ## if NO init. cond. file
|
|
fi
|
|
((counter++))
|
|
done
|
|
|