start_template.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/bash
  2. #
  3. #$ -wd /scratch1/parfenov/Soft/TestNodes/sge_ncx/TMP
  4. #$ -cwd
  5. #$ -N @jobnode@_check
  6. #$ -q all.q
  7. #$ -l h_rt=0:10:00
  8. #$ -l s_rt=0:10:00
  9. #$ -t 1-1
  10. #$ -l h=(@jobnode@)
  11. #
  12. #$ -o /scratch1/parfenov/Soft/TestNodes/sge_ncx/TMP
  13. #$ -e /scratch1/parfenov/Soft/TestNodes/sge_ncx/TMP
  14. #
  15. export JOB_ID=$JOB_ID
  16. export TASK_ID=$SGE_TASK_ID
  17. export START_DIR=${PWD}
  18. export MAIN_DIR=/scratch1/parfenov/Soft/TestNodes/sge_ncx
  19. export OUT_DIR=${MAIN_DIR}/OUT
  20. export OUT_LOG=${OUT_DIR}/log
  21. export OUT_COUNTER=${OUT_DIR}/counter
  22. export TMP_DIR=${MAIN_DIR}/TMP
  23. mkdir -p $OUT_LOG
  24. mkdir -p $OUT_COUNTER
  25. export LOG=${OUT_LOG}/@jobnode@.log
  26. export COUNTER=${OUT_COUNTER}/@jobnode@
  27. echo "Job : ${JOB_ID}" &>> $LOG
  28. echo "Node: @jobnode@" &>> $LOG
  29. echo "Test (cvmfs) begins." &>> $LOG
  30. echo "cd /cvmfs" &>> $LOG
  31. cd /cvmfs &>> $LOG
  32. echo "cd /cvmfs - done" &>> $LOG
  33. cd $START_DIR &>> $LOG
  34. echo "source /cvmfs/nica.jinr.ru/sw/os/login.sh" &>> $LOG
  35. source /cvmfs/nica.jinr.ru/sw/os/login.sh &>> $LOG
  36. echo "source /cvmfs/nica.jinr.ru/sw/os/login.sh - done" &>> $LOG
  37. echo "module add ROOT/v6-24-06-4" &>> $LOG
  38. module add ROOT/v6-24-06-4 &>> $LOG
  39. echo "module add ROOT/v6-24-06-4 - done" &>> $LOG
  40. echo "root -b -q" &>> $LOG
  41. root -b -q &>> $LOG
  42. echo "root -b -q - done" &>> $LOG
  43. touch $COUNTER
  44. echo "Job completed" &>> $LOG