mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
updated test cases to work with MPI and HDF5, all run from run_tests script
This commit is contained in:
parent
1ba465b4fc
commit
f22adabf15
130 changed files with 1447 additions and 496 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import os
|
||||
from subprocess import Popen, STDOUT, PIPE
|
||||
from nose_mpi import NoseMPI
|
||||
|
||||
pwd = os.path.dirname(__file__)
|
||||
|
||||
|
|
@ -10,7 +11,12 @@ def setup():
|
|||
os.chdir(pwd)
|
||||
|
||||
def test_run():
|
||||
proc = Popen([pwd + '/../../src/openmc', '-p'], stderr=STDOUT, stdout=PIPE)
|
||||
openmc_path = pwd + '/../../src/openmc'
|
||||
if int(NoseMPI.mpi_np) > 0:
|
||||
proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path, '-p'],
|
||||
stderr=STDOUT, stdout=PIPE)
|
||||
else:
|
||||
proc = Popen([openmc_path, '-p'], stderr=STDOUT, stdout=PIPE)
|
||||
returncode = proc.wait()
|
||||
print(proc.communicate()[0])
|
||||
assert returncode == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue