submit.py
Modified version of submit.py adopted for ark cluster.
Size 1 kB - File type text/python-sourceFile contents
#!/usr/bin/env python
#
# Usage: submit4.py stem ndlgs
import sys, posix, time
stem = sys.argv[1]
ndlgs = int(sys.argv[2])
ndlg_start = 1
if (len(sys.argv) == 4):
ndlg_start = int(sys.argv[3])
cwd = posix.getcwd()
created = time.time()
jobIDsName = """%s.%.2f.jobIDs""" % (stem, created)
command = """touch %s\n""" % (jobIDsName,)
posix.system(command)
for i in xrange(ndlg_start, (ndlg_start + ndlgs)):
#
jobname = """%s.%03d""" % (stem, i)
#
command = """echo "ulimit -s unlimited
echo SHELL is $SHELL
echo PATH is $PATH
cd %s
/usr/local/bin/autodock4 -p %s.dpf -l %s.dlg" > %s.j
chmod +x %s.j
qsub -l cput=23:00:00 -l nodes=1:ppn=1 -l walltime=23:30:00 -l mem=512mb %s.j >> %s
""" % (cwd, stem, jobname, jobname, jobname, jobname, jobIDsName)
#
posix.system(command)
#
# next i
command = """echo "Job %s was launched on %d processors with these job_identifiers:"
cat %s\n""" % (stem, ndlgs, jobIDsName,)
posix.system(command)
Click here to get the file
