@@ -37,22 +37,26 @@ def do_tests(build, out_file, do_standalone=True, do_main=True,
3737 if build :
3838 os .system ("./mk.sh" )
3939
40- opts = "driver.verbose=0 vis.dovis=0 io.do_io=0" . split ()
40+ opts = { "driver.verbose" : 0 , " vis.dovis" : 0 , " io.do_io" : 0 }
4141
4242 results = {}
4343
4444 if do_main :
4545 tests = []
4646 tests .append (PyroTest ("advection" , "smooth" , "inputs.smooth" , opts ))
4747 tests .append (PyroTest ("advection_rk" , "smooth" , "inputs.smooth" , opts ))
48- tests .append (PyroTest ("advection_fv4" , "smooth" , "inputs.smooth" , opts ))
48+ tests .append (PyroTest ("advection_fv4" ,
49+ "smooth" , "inputs.smooth" , opts ))
4950 tests .append (PyroTest ("compressible" , "quad" , "inputs.quad" , opts ))
5051 tests .append (PyroTest ("compressible" , "sod" , "inputs.sod.x" , opts ))
5152 tests .append (PyroTest ("compressible" , "rt" , "inputs.rt" , opts ))
5253 tests .append (PyroTest ("compressible_rk" , "rt" , "inputs.rt" , opts ))
53- tests .append (PyroTest ("compressible_fv4" , "acoustic_pulse" , "inputs.acoustic_pulse" , opts ))
54- tests .append (PyroTest ("compressible_sdc" , "acoustic_pulse" , "inputs.acoustic_pulse" , opts ))
55- tests .append (PyroTest ("diffusion" , "gaussian" , "inputs.gaussian" , opts ))
54+ tests .append (PyroTest ("compressible_fv4" , "acoustic_pulse" ,
55+ "inputs.acoustic_pulse" , opts ))
56+ tests .append (PyroTest ("compressible_sdc" , "acoustic_pulse" ,
57+ "inputs.acoustic_pulse" , opts ))
58+ tests .append (PyroTest ("diffusion" , "gaussian" ,
59+ "inputs.gaussian" , opts ))
5660 tests .append (PyroTest ("incompressible" , "shear" , "inputs.shear" , opts ))
5761 tests .append (PyroTest ("lm_atm" , "bubble" , "inputs.bubble" , opts ))
5862 tests .append (PyroTest ("swe" , "dam" , "inputs.dam.x" , opts ))
@@ -65,9 +69,11 @@ def do_tests(build, out_file, do_standalone=True, do_main=True,
6569 tests_to_run = tests
6670
6771 for t in tests_to_run :
68- err = pyro .doit (t .solver , t .problem , t .inputs ,
69- other_commands = t .options , comp_bench = True ,
70- reset_bench_on_fail = reset_fails , make_bench = store_all_benchmarks )
72+ p = pyro .PyroBenchmark (t .solver , comp_bench = True ,
73+ reset_bench_on_fail = reset_fails , make_bench = store_all_benchmarks )
74+ p .initialize_problem (t .problem , t .inputs , t .options )
75+ err = p .run_sim
76+
7177 results [str (t )] = err
7278
7379 # standalone tests
@@ -99,7 +105,8 @@ def do_tests(build, out_file, do_standalone=True, do_main=True,
99105 out .append (open (out_file , "w" ))
100106
101107 for f in out :
102- f .write ("pyro tests run: {}\n \n " .format (str (datetime .datetime .now ().replace (microsecond = 0 ))))
108+ f .write ("pyro tests run: {}\n \n " .format (
109+ str (datetime .datetime .now ().replace (microsecond = 0 ))))
103110
104111 for s , r in sorted (results .items ()):
105112 if not r == 0 :
0 commit comments