Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] View of /ea/job_submission.py
[bonfiredemokit] / ea / job_submission.py Repository:
ViewVC logotype

View of /ea/job_submission.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (download) (as text) (annotate)
Thu Aug 30 12:48:07 2012 UTC (11 years, 9 months ago) by agomez
File size: 1114 byte(s)
Added license text
#
# BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
#
# Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
# 
# License GPL Version 3
#
# The research leading to these results has received funding from 
# the European Community's Seventh Frameqork Programme (FP7/2007-2013) 
# under agreement number 257386
#
# This software is provided with ABSOLUTELY NO WARRANTY
# 
'''
Created on 01/03/2012

@author: R. Valin
'''
import saga

try:
# create an "echo 'hello, world' job"
    jd = saga.job.description()
    jd.set_attribute("Executable", "/bin/echo")
    jd.set_vector_attribute("Arguments", ["Hello, World!"])
    jd.set_attribute("Interactive", "True")
    
    # connect to the local job service
    js = saga.job.service("fork://localhost");
    
    # submit the job
    job = js.create_job(jd)
    job.run()
    
    # wait for the job to complete
    job.wait(-1)
    
    # print the job's output
    output = job.get_stdout()
    print output.read()
    
except saga.exception, e:
    print "ERROR: " 
    for err in e.get_all_messages():
      print err
    

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge