mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Fixes for statepoint writing with no_reduce turned on
This commit is contained in:
parent
68361b50ab
commit
cd01829764
1 changed files with 6 additions and 5 deletions
|
|
@ -272,7 +272,9 @@ openmc_statepoint_write(const char* filename, bool* write_source)
|
|||
} else if (mpi::master) {
|
||||
// Write number of global realizations
|
||||
write_dataset(file_id, "n_realizations", simulation::n_realizations);
|
||||
}
|
||||
|
||||
if (mpi::master) {
|
||||
// Write out the runtime metrics.
|
||||
using namespace simulation;
|
||||
hid_t runtime_group = create_group(file_id, "runtime");
|
||||
|
|
@ -774,9 +776,6 @@ void write_tally_results_nr(hid_t file_id)
|
|||
// Write number of realizations
|
||||
write_dataset(file_id, "n_realizations", simulation::n_realizations);
|
||||
|
||||
// Write number of global tallies
|
||||
write_dataset(file_id, "n_global_tallies", N_GLOBAL_TALLIES);
|
||||
|
||||
tallies_group = open_group(file_id, "tallies");
|
||||
}
|
||||
|
||||
|
|
@ -808,7 +807,7 @@ void write_tally_results_nr(hid_t file_id)
|
|||
if (!t->active_) continue;
|
||||
if (!t->writable_) continue;
|
||||
|
||||
if (mpi::master && !object_exists(file_id, "tallies_present")) {
|
||||
if (mpi::master && !attribute_exists(file_id, "tallies_present")) {
|
||||
write_attribute(file_id, "tallies_present", 1);
|
||||
}
|
||||
|
||||
|
|
@ -817,7 +816,7 @@ void write_tally_results_nr(hid_t file_id)
|
|||
xt::range(static_cast<int>(TallyResult::SUM), static_cast<int>(TallyResult::SUM_SQ) + 1));
|
||||
|
||||
// Make copy of tally values in contiguous array
|
||||
xt::xtensor<double, 2> values = values_view;
|
||||
xt::xtensor<double, 3> values = values_view;
|
||||
|
||||
if (mpi::master) {
|
||||
// Open group for tally
|
||||
|
|
@ -863,6 +862,8 @@ void write_tally_results_nr(hid_t file_id)
|
|||
// Indicate that tallies are off
|
||||
write_dataset(file_id, "tallies_present", 0);
|
||||
}
|
||||
|
||||
close_group(tallies_group);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue