Moved allocation/freeing of SHM fission bank into the existing allocation/freeing routines for the bank, to simplify things slightly. Also restored the DagMC regression tests.

This commit is contained in:
John Tramm 2020-01-13 22:58:19 +00:00
parent 4371279719
commit ad96fa6ffa
6 changed files with 5 additions and 14 deletions

View file

@ -37,7 +37,6 @@ extern int shared_fission_bank_max;
void free_memory_bank();
void init_shared_fission_bank(int max);
void free_shared_fission_bank(void);
} // namespace openmc

View file

@ -33,6 +33,8 @@ void free_memory_bank()
{
simulation::source_bank.clear();
simulation::fission_bank.clear();
delete[] simulation::shared_fission_bank;
simulation::shared_fission_bank_length = 0;
}
void init_shared_fission_bank(int max)
@ -42,12 +44,6 @@ void init_shared_fission_bank(int max)
simulation::shared_fission_bank_length = 0;
}
void free_shared_fission_bank(void)
{
delete[] simulation::shared_fission_bank;
simulation::shared_fission_bank_length = 0;
}
//==============================================================================
// C API
//==============================================================================

View file

@ -108,7 +108,6 @@ int openmc_simulation_init()
// Allocate source bank, and for eigenvalue simulations also allocate the
// fission bank
allocate_banks();
init_shared_fission_bank(simulation::work_per_rank * 3);
// Allocate tally results arrays if they're not allocated yet
for (auto& t : model::tallies) {
@ -192,8 +191,6 @@ int openmc_simulation_finalize()
}
if (settings::check_overlaps) print_overlap_check();
free_shared_fission_bank();
// Reset flags
simulation::need_depletion_rx = false;
simulation::initialized = false;
@ -302,6 +299,9 @@ void allocate_banks()
if (settings::run_mode == RUN_MODE_EIGENVALUE) {
simulation::fission_bank.reserve(3*simulation::work_per_rank);
}
// Allocate shared bank
init_shared_fission_bank(simulation::work_per_rank * 3);
}
void initialize_batch()

View file

@ -50,8 +50,6 @@ def model():
return model
import pytest
@pytest.mark.skip(reason="DAGMC not planned for GPU support.")
def test_dagmc(model):
harness = PyAPITestHarness('statepoint.5.h5', model)
harness.main()

View file

@ -35,7 +35,6 @@ class UWUWTest(PyAPITestHarness):
model.tallies.export_to_xml()
@pytest.mark.skip(reason="DAGMC not planned for GPU support.")
def test_refl():
harness = UWUWTest('statepoint.5.h5')
harness.main()

View file

@ -35,7 +35,6 @@ class UWUWTest(PyAPITestHarness):
model.tallies.export_to_xml()
@pytest.mark.skip(reason="DAGMC not planned for GPU support.")
def test_uwuw():
harness = UWUWTest('statepoint.5.h5')
harness.main()