# # BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit # # Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012 # # License Apache Software # # The research leading to these results has received funding from # the European Community's Seventh Framework Programme (FP7/2007-2013) # under agreement number 257386 # # This software is provided with ABSOLUTELY NO WARRANTY # ''' Created on 18/05/2012 @author: Raul Valin ''' import os import time import random import subprocess as sub def sub_app(master): cmd = '/home/cesga/bonfire/workspace/Bonfire/branch/ea_json_file/verification_bonfire_1/launch_quasimodo_manual.sh'+' '+str(random.randint(1,100))+' LOW '+ master print cmd try: #print 'abro popen' fout = sub.Popen(cmd,bufsize=-1,shell=True,stdout=sub.PIPE, stderr=sub.STDOUT,close_fds=True) #print 'salgo popen' out,err =fout.communicate(input=None) except ValueError, msg: print 'Error', msg, err else: print out #sub_app('127.0.0.1')