examples/example_22_saga_python/start_saga.py
def merge_trajectories(session):
    """ Merges all trajectories found in the working directory """
    jd = saga.job.Description()

    jd.executable      = 'python'
    jd.arguments       = ['merge_trajs.py']
    jd.output          = "mysagajob_merge.stdout"
    jd.error           = "mysagajob_merge.stderr"
    jd.working_directory = WORKING_DIR

    js = saga.job.Service('ssh://' + ADDRESS, session=session)
    myjob = js.create_job(jd)
    print("\n...starting job...\n")

    # Now we can start our job.
    myjob.run()
    print("Job ID    : %s" % (myjob.id))
    print("Job State : %s" % (myjob.state))

    print("\n...waiting for job...\n")
    # wait for the job to either finish or fail
    myjob.wait()

    print("Job State : %s" % (myjob.state))
    print("Exitcode  : %s" % (myjob.exit_code))
def merge_trajectories(session):
    jd = saga.job.Description()

    jd.executable      = 'python'
    jd.arguments       = ['merge_trajs.py']
    jd.output          = "mysagajob_merge.stdout"
    jd.error           = "mysagajob_merge.stderr"
    jd.working_directory = WORKING_DIR

    js = saga.job.Service('ssh://' + ADDRESS, session=session)
    myjob = js.create_job(jd)
    print("\n...starting job...\n")

    # Now we can start our job.
    myjob.run()
    print("Job ID    : %s" % (myjob.id))
    print("Job State : %s" % (myjob.state))

    print("\n...waiting for job...\n")
    # wait for the job to either finish or fail
    myjob.wait()

    print("Job State : %s" % (myjob.state))
    print("Exitcode  : %s" % (myjob.exit_code))
def merge_trajectories ( session ) : jd = saga . job . Description ( ) jd . executable = 'python' jd . arguments = [ 'merge_trajs.py' ] jd . output = "mysagajob_merge.stdout" jd . error = "mysagajob_merge.stderr" jd . working_directory = WORKING_DIR js = saga . job . Service ( 'ssh://' + ADDRESS , session = session ) myjob = js . create_job ( jd ) print ( "\n...starting job...\n" ) # Now we can start our job. myjob . run ( ) print ( "Job ID    : %s" % ( myjob . id ) ) print ( "Job State : %s" % ( myjob . state ) ) print ( "\n...waiting for job...\n" ) # wait for the job to either finish or fail myjob . wait ( ) print ( "Job State : %s" % ( myjob . state ) ) print ( "Exitcode  : %s" % ( myjob . exit_code ) )
Merges all trajectories found in the working directory
Merges all trajectories found in the working directory