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.

31 lines
1.1 KiB

  1. #!/bin/bash
  2. ############################################
  3. # A script to run (N-1) ipglasma 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 ## start with this event
  10. testFile=usedParameters0.dat ## check if this file present - if present, do nothing
  11. until [ $counter -gt $1 ] ## loop over all numbers until N-1 where N=$1
  12. do
  13. echo Count $counter
  14. checkDir=/lustre/alice/users/jcrkovsk/IPGlasmaEvents/Event$counter
  15. # checkDir=Event$counter
  16. if [ -d "$checkDir" ]; then ## check if directory exists
  17. echo "Directory ${checkDir} already exists."
  18. else
  19. echo "Creating directory ${checkDir}"
  20. mkdir ${checkDir}
  21. fi
  22. if [ -f "${checkDir}/${testFile}" ]; then ## check if the file exists
  23. echo "File exists. Nothing to do."
  24. else
  25. sbatch --job-name IPG$counter --time=5:00:00 makeSingleEvent.sh $counter ## submit single glasma event
  26. fi
  27. ((counter++))
  28. done