split_main.sh 834 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #$ -cwd
  2. #$ -A weizhe.li
  3. #$ -l h_rt=001:00:00
  4. #$ -S /bin/sh
  5. #$ -j y
  6. #$ -o sysout_main
  7. #$ -N split_main
  8. echo "Running job $JOB_ID on $HOSTNAME"
  9. QSUB=/opt/sge_root/bin/lx-amd64/qsub
  10. ARRAY_SCRIPT=split_grp.sh
  11. # Get params
  12. # source ./config.txt
  13. # CNFG_FILE="./config_normal.txt"
  14. CNFG_FILE=$1
  15. source $CNFG_FILE
  16. ls -1 $FILE_DIR > $LISTFILE
  17. mv $SPLIT_BASE_DIR "$SPLIT_BASE_DIR"_"$JOB_ID" 2>/dev/null
  18. mkdir -p $SPLIT_BASE_DIR
  19. SG_DIR=/scratch/mikem/UserSupport/weizhe.li/runs_split_group
  20. mkdir -p $SG_DIR
  21. BASE_DIR="$TYPE"_"$SG_DIR"/"$PATCH_SIZE"_"$SPLIT_SIZE"_"$JOB_ID"
  22. ST=1
  23. EN=`cat $LISTFILE | wc -l`
  24. SYSOUT_DIR="$BASE_DIR"/sysout
  25. mkdir -p $SYSOUT_DIR
  26. # test
  27. # ST=1
  28. # EN=3
  29. echo "$QSUB -pe thread -t "$ST"-"$EN" -o $SYSOUT_DIR $ARRAY_SCRIPT"
  30. $QSUB -pe thread 1 -t "$ST"-"$EN" -o $SYSOUT_DIR -N sg_"$TYPE" $ARRAY_SCRIPT $CNFG_FILE