The conditional to reshape/extend the "depletion time"
dataset in the exporting of a deplete.Results object
has been removed. This caused the last exporting to
hang when running with MPI
Use new timed_deplete wrapper func to obtain process time.
Pass process time to modifed openmc.deplete.Results.save
to be reduced and written to depletion file.
test_deplete_predictor is modified to ensure that the
shape of the resulting "depletion time" vector is correct
Simple wrapper function that passes all arguments to
openmc.deplete.integrator.deplete and returns a two-item
tuple. The first item is the process time spent depleting
all materials (can be on one of many MPI processes).
The second item is what is returned directly from the
deplete function.
Returns a numpy array with the time spent depleting materials
between transport steps. This array has shape
(N-1, 1), where N is the number of transport steps
Method openmc.deplete.Results.save now accepts a new argument,
proc_time, to represent the time each process spent depleting
all materials. This value is summed across all processes to
get the total cpu time depleting. Time in transport simulations
should not be included.
The value written to depletion_results.h5 is
proc_time / (n_proc * n_burn_materials)
to get a look at the average time required to deplete a material.
A new dataset, "depletion time" is created in this file, and has
one fewer rows than other data set, like eigenvalues. This corresponds
to there being one fewer round of depletion simulations than transport.
The proc_time is also read in from the depletion file in the
class method Results.from_hdf5(), with one notable exception.
If data from the last step is requested, then the proc_time
attribute will be a numpy array of nans, reflecting the lack
of depletion data.
Check added in openmc/depletion/__init__.py.
Without this check, the exporting of the Results to hdf5 will
hang, as the second process attempts to write to a file
that has already been opened on another process.
This error is only raised after a full transport calculation
has been run.
The check raises a more helpful error directly at the import
from openmc.deplete, prior to transport calculations.
After PR #1247, the cross section file is allowed to contain
the depletion chain file. This is present as a new tag, of
the form
```
<depletion_chain path="path.xml" type="depletion_chain" />
```
The Element.expand method looked for `material` attributes
in all children of the OPENMC_CROSS_SECTION file.
This caused an error for the depletion_chain element.
Now, only those children with the `library` tag are
iterated over.