Closed gridley closed 1 week ago
Note: the multiprocessing error only seems to happen on mac. It's working fine on my ubuntu desktop.
Oh sick, thank you Olek! My apologies, unsure why I thought that. It is a lovely feature to have for analyzing reactors.
Will get the test in fosho.
OK @yardasol, I found that the test I've added here was able to reproduce the original problem, and passes with the introduction of these commits.
@yardasol are you satisfied with the changes in this PR?
I would really prefer to not do that. The only potential problem with zero power is hitting that branch between calculating a normalizing factor and not, so I can't think of any difference that would take place with a filled MicroXS object.
If @paulromano thinks it's fine then I'm satisfied.
Description
Fixes #2963
Fixes #2968
EDIT this also fixes #2968 with the second commit it adds.
Autopep8'd the independent operator file, and adds handling for decay only steps as we have in the coupled operator. This prevents an error where the heating is calculated as zero and an error is thrown erroneously. After taking this PR, the following code can produce this nice little plot in which we track the first two decay progeny of U239. It has a half life around 1400s and we can see that behavior nicely in this plot. Notably I need to turn off multiprocessing to have this work, described below.
It's so nice to have standalone decay like this, thanks @paulromano for implementing the
IndependentOperator
🙂HOWEVER I am running into issues with multiprocessing set to true and may need some help. This error recurrently appears if depletion multiprocessing is turned on:
I guess we've missed some idiom here and haven't hit this race condition before because this case runs the depletion solver without much latency? If anyone knows where this
freeze_support
might reasonably go, I would very much appreciate your input.Checklist