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.

19 lines
694 B

  1. #!/bin/bash
  2. ############################################################
  3. # Script to get jobname for each crashed job #
  4. # If jobname contains event number => get crashed events #
  5. # #
  6. # argument $1 - list of failed hydro jobs #
  7. # you can get that by running 'bash makelist.sh' #
  8. ############################################################
  9. if [[ -f "crashed_jobs.txt" ]]; then ## delete previous list
  10. rm crashed_jobs.txt
  11. fi
  12. for item in `cat $1` ## loop over crashed job IDs
  13. do
  14. #echo $item
  15. sacct -j $item --format=Jobname >> crashed_jobs.txt ## gets a jobname for each job
  16. done