Repository to share code among the members of the SHM Working Group.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.3 KiB

  1. #!/bin/bash
  2. ###############################################
  3. # A script to run (N-1) MUSIC Hydro events #
  4. # #
  5. # argument $1 = N #
  6. # Code checks if event exists and if not #
  7. # submits a single event script to sbatch #
  8. ###############################################
  9. counter=1
  10. requiredFile="epsilon-u-Hydro-t0.6-0.dat" ## file with Glasma initial conditions
  11. testFile="surface_eps_0.3147.dat" ## surface file - check name! (same in all events)
  12. until [ $counter -gt $1 ] ## loop pver N-1 events
  13. do
  14. #echo Count $counter
  15. checkDir=/lustre/alice/users/jcrkovsk/IPGlasmaEvents/Event$counter/Hydro06
  16. aboveDir=/lustre/alice/users/jcrkovsk/IPGlasmaEvents/Event$counter
  17. if [[ ! -d "$checkDir" ]]; then ## check existence of HydroXX folder
  18. echo "Creating directory ${checkDir}"
  19. mkdir ${checkDir}
  20. fi
  21. if [[ -f "${aboveDir}/${requiredFile}" ]]; then ## if THERE IS init. cond. file in the workdir
  22. if [[ ! -f "${checkDir}/${testFile}" ]]; then ## if NO surface file in the workdir
  23. sbatch --job-name 06H$counter --time=8:00:00 singleEventHydro.sh $counter ## submits a job
  24. fi
  25. else
  26. echo "Counter $counter: Missing IPGlasma files!!!" ## if NO init. cond. file
  27. fi
  28. ((counter++))
  29. done