forked from gitytakahas/NanoTreeProducer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsubmit_SGE.sh
41 lines (37 loc) · 937 Bytes
/
submit_SGE.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/bash
## Script to run on a Sun Grid Engine batch system
## make sure the right shell will be used
#$ -S /bin/bash
## Black list nodes
##$ -l h=t3wn43.psi.ch
##$ -l h=!t3wn34.psi.ch
##$ -l h=!t3wn5*.psi.ch
##$ -l h=!(t3wn34.psi.ch|t3wn5*.psi.ch)
## the cpu time for this job
#$ -l h_rt=04:20:00
## the maximum memory usage of this job
#$ -l h_vmem=5900M
## Job Name
#$ -N test
## stderr and stdout are merged together to stdout
#$ -j y
## transfer env var from submission host
#$ -V
## set cwd to submission host pwd
#$ -cwd
echo job start at `date`
echo "Running job on machine $((uname -a))"
export JOB_ID
export TASKID=$((SGE_TASK_ID))
JOBLIST=$1
echo "\$JOB_ID=$JOB_ID"
echo "\$SGE_TASK_ID=$TASKID"
echo "\$HOSTNAME=$HOSTNAME"
echo "\$JOBLIST=$JOBLIST"
TASKCMD=$(cat $JOBLIST | sed "${TASKID}q;d")
#eval $(scramv1 runtime -sh);
pwd
echo "Going to execute"
echo " $TASKCMD"
eval $TASKCMD;
echo "Job complete at $((date))";