/
job_submit.sh
48 lines (40 loc) · 1.33 KB
/
job_submit.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
42
43
44
45
46
47
48
#!/bin/sh
# This script is for submitting multiple runs to the an SGE cluster queue
# in MATLAB.
#
# Alter the -m for notification options
# -M for email notification
# -t for number of subtasks (passed as env variable SGE_TASK_ID)
# -tc for number of concurrent tasks to run
#
#
# Original header below:
#
## SGE job script for sumbitting matlab jobs to an SGE cluster queue.
## This is submitted to the queue by the job.sh script. It simply runs
## matlab with the correct arguments.
## By David Black-Schaffer, June 2007.
## Permission to use and modify this script is granted.
## I am not responsible for any errors in this script, so be forewarned!
#$ -j n
#$ -o job-nobackup.$JOB_ID.$TASK_ID.out
#$ -e job-nobackup.$JOB_ID.$TASK_ID.err
#$ -cwd
#$ -m beas
#$ -M <email> for notifications
#$ -t 1:37
#$ -tc 20
echo "Starting job: $SGE_TASK_ID"
# Run matlab without display, without jvm
# -r is the option for which script to run, in this case
# multiple_run_chromhl (do not add .m)
# "< /dev/null" prevents MATLAB giving errors running
# non-interactively
matlab -nojvm -nodisplay -r multiple_run_chromhl < /dev/null
echo "Done with job: $SGE_TASK_ID"
# Note that the .out file will have
#
# Warning: no access to tty (Bad file descriptor).
# Thus no job control in this shell.
#
# at top - this can be ignored safely.