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

Annotation of /ea/submit_file.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (view) (download) (as text)

1 : agomez 9 #
2 :     # BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
3 :     #
4 :     # Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
5 :     #
6 :     # License GPL Version 3
7 :     #
8 :     # The research leading to these results has received funding from
9 :     # the European Community's Seventh Frameqork Programme (FP7/2007-2013)
10 :     # under agreement number 257386
11 :     #
12 :     # This software is provided with ABSOLUTELY NO WARRANTY
13 :     #
14 : agomez 1 '''
15 :     Created on 20/03/2012
16 :    
17 :     @author: R. Valin
18 :     '''
19 :    
20 :     #import matplotlib.pyplot as plt
21 :     import time
22 :     import json
23 :     import os
24 :     import sys
25 :     import random
26 :     #from exp.ea
27 :     #import experiment_type as expt
28 :     #from exp.ea
29 :     import ea_bonfire as ea
30 :    
31 :    
32 :     #print 'Ruta completa del Json que define experimento:'
33 :     #filej=raw_input()
34 :     if len(sys.argv) < 2:
35 :     sys.stderr.write('A JSON file is needed')
36 :     #sys.stderr.write('Usage: sys.argv[0] ')
37 :     sys.exit(1)
38 :    
39 :     filej="../examples/"+sys.argv[1]
40 :     if not os.path.exists(filej):
41 :     sys.stderr.write('ERROR: file '+filej+ 'does not exist!')
42 :     sys.exit(1)
43 :    
44 :     print '----------------'
45 :     print 'Json PATH:',filej
46 :     print '----------------'
47 :    
48 :     if os.path.exists(filej):
49 :     jsonf=open(filej, 'r')
50 :     exper=json.loads(jsonf.read())
51 :     print exper
52 :     jsonf.close()
53 :     else:
54 :     print "File doesn't exist"
55 :    
56 :    
57 :     #duration = 120
58 : agomez 3 #Number of repetitions
59 : agomez 1
60 : agomez 3 multi = 1
61 :    
62 : agomez 1 #for i in exp:
63 :     # print i
64 :     # m=str(i)
65 :     j=0
66 :     while j < multi:
67 :     #save(locations)
68 :     #location=info_location[m]
69 :     #instance=info_instance[m]
70 :     #store=info_storage[m]
71 :     print 'Repetition before ea:', j
72 :     j=ea.ea_bf(exper,j)
73 :     j=j+1
74 :     #time.sleep(float(130))
75 :    
76 :    
77 :    

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

Powered By FusionForge