genJobs.sh 771 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/csh
  2. set DST_PATH = "/mnt/pool/rhic/4/parfenovpeter/mpd_data/7.7gev_READY/reco/mpddst_reduced_9781283_[0-2][0-9].root"
  3. set MAX_DST_PER_JOB = 5
  4. set MASK_LIST = "dstList"
  5. set MASK_JOB = "job"
  6. set MASK_OUT = "out"
  7. set DST_COUNTER = 0
  8. set JOB_COUNTER = 0
  9. set QUERY = "short"
  10. foreach dstFile ( $DST_PATH )
  11. @ DST_COUNTER = $DST_COUNTER + 1
  12. echo "$dstFile" >> "${MASK_LIST}_${JOB_COUNTER}.list"
  13. if ( $DST_COUNTER == $MAX_DST_PER_JOB ) then
  14. set DST_COUNTER = 0
  15. @ JOB_COUNTER = $JOB_COUNTER + 1
  16. cat > "${MASK_JOB}_${JOB_COUNTER}.sh" << EOF
  17. #!/bin/bash
  18. cd $PWD
  19. root.exe -b -q RealFlow.C\(\"${MASK_LIST}_${JOB_COUNTER}.list\",\"${MASK_OUT}_${JOB_COUNTER}.root\"\)
  20. EOF
  21. qsub -q $QUERY "${MASK_JOB}_${JOB_COUNTER}.sh"
  22. endif
  23. end