You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple instances of a job service during a session fail more or less randomly:
#!/usr/bin/env python# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4'''This examples shows how to copy a file to a remote host via ssh using a custom security context. If something doesn't work as expected, try to set SAGA_VERBOSE=3 in your environment before you run the script in order to get some debug output. If you think you have encountered a defect, please report it at: https://github.com/oweidner/bliss/issues'''__author__="Ole Christian Weidner"__email__="ole.weidner@me.com"__copyright__="Copyright 2011, Ole Christian Weidner"__license__="MIT"importtimeimportbliss.sagaassagadefmain():
execution_host=saga.Url("pbs+ssh://queenbee.loni.org")
bfast_base_dir=saga.Url("sftp://queenbee.loni.org/work/oweidner/bfast")
try:
ctx=saga.Context()
ctx.type=saga.Context.SSHctx.userid='oweidner'# like 'ssh username@host ...'ctx.usercert='/Users/s1063117/.ssh/id_rsa'# like ssh -i ...'session=saga.Session()
session.contexts.append(ctx)
workdir="%s/tmp/run/%s"% (bfast_base_dir.path, str(int(time.time())))
basedir=saga.filesystem.Directory(bfast_base_dir, session=session)
basedir.make_dir(workdir)
js=saga.job.Service(execution_host, session)
jd=saga.job.Description()
jd.wall_time_limit="0:05:00"jd.total_cpu_count=1jd.environment= {'BFAST_DIR':bfast_base_dir.path}
jd.working_directory=workdirjd.executable='$BFAST_DIR/bin/bfast'jd.arguments= ['match', '-A 1',
'-r $BFAST_DIR/data/small/reads_5K/reads.10.fastq',
'-f $BFAST_DIR/data/small/reference/hg_2122.fa']
myjob=js.create_job(jd)
myjob.run()
time.sleep(1)
print"Job started with ID '%s' and working directory: '%s'"\
% (myjob.jobid, workdir)
myjob.wait()
print"Job with ID '%s' finished (RC: %s). Output available in: '%s'"\
% (myjob.jobid, myjob.exitcode, workdir)
exceptsaga.Exception, ex:
print"Oh, snap! An error occured: %s"% (str(ex))
if__name__=="__main__":
foriinrange (0,8):
main()
The text was updated successfully, but these errors were encountered:
try:
# set up a security context (optional)
# if no security context is defined, the PBS
# plugin will pick up the default set of ssh
# credentials of the user, i.e., ~/.ssh/id_rsa
# create a job service for Futuregrid's 'india' PBS cluster
# and attach the SSH security context to it
js = saga.job.Service("pbs+ssh://alamo.futuregrid.org")
js1 = saga.job.Service("pbs+ssh://alamo.futuregrid.org")
# describe our job
jd = saga.job.Description()
# resource requirements
jd.wall_time_limit = 5 #minutes
jd.total_cpu_count = 1
# environment, executable & arguments
jd.environment = {'SLEEP_TIME':"hello_saga"}
jd.executable = '/bin/cat'
jd.arguments = ['$SLEEP_TIME']
# output options
jd.output = "bliss_pbssh_job.stdout"
jd.error = "bliss_pbssh_job.stderr"
# create the job (state: New)
myjob = js.create_job(jd)
myjob1 = js1.create_job(jd)
print "Job ID : %s" % (myjob.jobid)
print "Job State : %s" % (myjob.get_state())
print "\n...starting job...\n"
# run the job (submit the job to PBS)
myjob.run()
myjob1.run()
print "Job ID : %s" % (myjob.jobid)
print "Job State : %s" % (myjob.get_state())
print "\n...waiting for job...\n"
# wait for the job to either finish or fail
myjob.wait()
myjob1.wait()
print "Job State : %s" % (myjob.get_state())
print "Exitcode : %s" % (myjob.exitcode)
Multiple instances of a job service during a session fail more or less randomly:
The text was updated successfully, but these errors were encountered: