- Timestamp:
- Jun 16, 2014, 8:08:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/validation_utilities/run_validation.py
r9148 r9164 5 5 __date__ ="$20/08/2012 11:20:00 PM$" 6 6 7 7 8 8 def run_validation_script(script): 9 def run_validation_script(script, np=1, cfl=None, alg=None, verbose=False): 10 """ For backwards compatiblity wrap new run_anuga_script as run_validation_script 11 """ 12 13 from anuga import run_anuga_script 14 15 run_anuga_script(script, np=np, cfl=cfl, alg=alg, verbose=verbose) 16 17 18 def run_validation_script_old(script,np=1, cfl=None, alg=None, verbose=False): 9 19 #from anuga.validation_utilities.fabricate import run 10 from anuga.validation_utilities.parameters import alg,cfl11 20 21 if cfl is None: 22 from anuga.validation_utilities.parameters import cfl 23 if alg is None: 24 from anuga.validation_utilities.parameters import alg 25 12 26 import subprocess 13 cmd = 'python %s -cfl %s -alg %s' % (script, str(cfl), str(alg)) 14 print 50*'=' 15 print 'Run '+cmd 16 print 50*'=' 17 subprocess.call([cmd], shell=True) 18 #run('python', script, '-alg', alg, '-cfl', cfl) 27 28 if np>1: 29 if verbose: 30 cmd = 'mpirun -np %s python %s -cfl %s -alg %s -v ' % (str(np), script, str(cfl), str(alg)) 31 else: 32 cmd = 'mpirun -np %s python %s -cfl %s -alg %s' % (str(np), script, str(cfl), str(alg)) 33 print 50*'=' 34 print 'Run '+cmd 35 print 50*'=' 36 subprocess.call([cmd], shell=True) 37 38 else: 39 if verbose: 40 cmd = 'python %s -cfl %s -alg %s -v ' % (script, str(cfl), str(alg)) 41 else: 42 cmd = 'python %s -cfl %s -alg %s' % (script, str(cfl), str(alg)) 43 print 50*'=' 44 print 'Run '+cmd 45 print 50*'=' 46 subprocess.call([cmd], shell=True) 47 19 48 20 49
Note: See TracChangeset
for help on using the changeset viewer.