Running in event-based mode correctly, from what I can tell./

This commit is contained in:
John Tramm 2020-01-24 03:02:45 +00:00
parent e0da6af91e
commit 51cec9db93
3 changed files with 19 additions and 15 deletions

View file

@ -387,8 +387,8 @@ class Settings(object):
return self._dagmc
@property
def event(self):
return self._event
def event_based(self):
return self._event_based
@property
def max_in_flight_particles(self):

View file

@ -66,9 +66,14 @@ class TestHarness(object):
self._cleanup()
def _run_openmc(self):
if config['mpi']:
if config['mpi'] and not config['event']:
mpi_args = [config['mpiexec'], '-n', config['mpi_np']]
openmc.run(openmc_exec=config['exe'], mpi_args=mpi_args)
elif config['mpi'] and config['event']:
mpi_args = [config['mpiexec'], '-n', config['mpi_np']]
openmc.run(openmc_exec=config['exe'], mpi_args=mpi_args, event_based=True)
elif config['event']:
openmc.run(openmc_exec=config['exe'], event_based=True)
else:
openmc.run(openmc_exec=config['exe'])

View file

@ -1,17 +1,16 @@
#!/bin/bash
set -ex
# Run regression and unit tests
# Compile argument list
args=" "
if [[ $MPI == 'y' ]]; then
if [[ $EVENT == 'y' ]]; then
pytest --cov=openmc -v --mpi --event tests
else
pytest --cov=openmc -v --mpi tests
fi
else
if [[ $EVENT == 'y' ]]; then
pytest --cov=openmc -v --event tests
else
pytest --cov=openmc -v tests
fi
args="${args} --mpi "
fi
if [[ $EVENT == 'y' ]]; then
args="${args} --event "
fi
# Run regression and unit tests
pytest --cov=openmc -v $args tests