terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
234 stars 89 forks source link

Support for component level MPI syncs #1205

Open HunterPSmith opened 1 year ago

HunterPSmith commented 1 year ago

It appears that when multiple individual components' number densities within a singular block are modified independently across nodes, ARMI sync testing fails incorrectly. The sync state believes that the same component within a singular block is being modified across multiple nodes.

onufer commented 1 year ago

basically we are doing component level depletion in MPI so different nodes are editing different components number densities (within the same block). This is what ARMI sees:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

node | 1 | 2 -- | -- | -- block | b-001 | b-001 c1 dens | orginal value | new value c2 dens | new Value | original value

and it sees c1 is different on both the nodes, when node 1 depleted c2 but node 2 depleted c1. The densities are intended to be different because one node did a depletion and one node didn't but this error gets raised because they are inconsistent:

https://github.com/terrapower/armi/blob/9de4be8b706a3b4ef96d78b57632fb3130bf3114/armi/reactor/composites.py#L2914-L2933

When we group the components complete by block and make sure components in 1 block are never edited by more than 1 node, the issue is resolved.

john-science commented 1 year ago

I would love a working toy example of this.

john-science commented 2 months ago

@albeanth hit this problem for depletion