forked from ahellander/molnsutil
-
Notifications
You must be signed in to change notification settings - Fork 2
/
job_submission.pbs
49 lines (37 loc) · 2.32 KB
/
job_submission.pbs
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
49
#!/usr/bin/env bash
SERVER=$PBS_O_HOST
SCP=/usr/bin/scp
SSH=/usr/bin/ssh
echo ------------------------------------------------------
echo -n 'Job is running on node '; cat $PBS_NODEFILE
echo ------------------------------------------------------
echo PBS: qsub is running on $PBS_O_HOST
echo PBS: originating queue is $PBS_O_QUEUE
echo PBS: executing queue is $PBS_QUEUE
echo PBS: qsub working directory is $PBS_O_WORKDIR
echo PBS: execution mode is $PBS_ENVIRONMENT
echo PBS: job identifier is $PBS_JOBID
echo PBS: job name is $PBS_JOBNAME
echo PBS: node file is $PBS_NODEFILE
echo PBS: current home directory is $PBS_O_HOME
echo PBS: PATH = $PBS_O_PATH
echo ------------------------------------------------------
echo -n 'Job is running on node '; cat $PBS_NODEFILE
echo ------------------------------------------------------
echo ' '
echo ' '
runprogram()
{
curr_dir=`pwd`
parent_dir=`dirname ${curr_dir}`
molnsutil_dir=`dirname ${parent_dir}`
# docker pull aviralcse/stochss_qsub
docker run -e PYTHONPATH=/stochss-master/app/lib/pyurdme-stochss:/stochss-master/app/lib:/stochss-master/app/handlers:/stochss-master/app/ -e STOCHKIT_HOME=/stochss-master/StochKit -e C_INCLUDE_PATH=/usr/lib/openmpi/include -e INSTANT_SYSTEM_CALL_METHOD=SUBPROCESS -e PATH=/stochss-master/ode:${PATH} --volume ${curr_dir}:/stochss-master/app/lib/w_dir/ --volume ${molnsutil_dir}:/stochss-master/app/lib/molnsutil/ -w /stochss-master/app/lib/w_dir/ --name ${PBS_JOBNAME} aviralcse/stochss_qsub:updated_stochss_for_releasev4 /bin/bash -c "rm /stochss-master/app/handlers/parametersweep_qsub.py; touch /stochss-master/app/handlers/parametersweep_qsub.py; python job.py"
if [ "$?" -ne 0 ]; then echo "Failed to start Docker container correctly." >> error; fi;
touch complete
docker rm -f ${PBS_JOBNAME}
}
# RUN
runprogram
exit
# docker run -it -e PYTHONPATH=/stochss-master/app/lib/pyurdme-stochss:/stochss-master/app/lib:/stochss-master/app/handlers:/stochss-master/app/ -e STOCHKIT_HOME=/stochss-master/StochKit -e C_INCLUDE_PATH=/usr/lib/openmpi/include -e INSTANT_SYSTEM_CALL_METHOD=SUBPROCESS -e PATH=/stochss-master/ode:${PATH} --volume `pwd`:/stochss-master/app/lib/w_dir/ --volume /home/aviral/.molns_cluster_exec/molnsutil/:/stochss-master/app/lib/molnsutil/ -w /stochss-master/app/lib/w_dir/ aviralcse/stochss_qsub:updated_stochss_for_release /bin/bash