Personal tools
You are here: Home Ark
Document Actions

by sargis last modified 2010-02-03 14:56

Modified version of adopted for ark cluster.

Click here to get the file

Size 1 kB - File type text/python-source

File contents

#!/usr/bin/env python
# Usage: 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,)

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)
    # next i
command = """echo "Job %s was launched on %d processors with these job_identifiers:"

cat %s\n""" % (stem, ndlgs, jobIDsName,)

Powered by Plone, the Open Source Content Management System