Closed zachmprince closed 2 weeks ago
Quick Question:
You added new code, why are there no tests of this? (Did you try, and it was too hard to test?)
Quick Question:
You added new code, why are there no tests of this? (Did you try, and it was too hard to test?)
I just didn't think of it. I can add a test.
@john-science @opotowsky Changed log message to extra
and added a test in test_mpiFeatures
.
What is the change?
The PR creates a method in
Operator
that is called_finalizeInteract
which is called inside interface loop of_interactAll
. This method is overridden byOperatorMPI
to "reset" worker processors by broadcasting a command to force execution of_resetWorker
.Why is the change being made?
The purpose of this change to force worker resets after each interaction is complete, instead of relying on plugins to return the correct
mpiActionRequiresReset
duringMpiAction
invocations. The goal was to reduce memory when going to subsequent interfaces that don't require a distributed state. However, the addition of this reset call is not reducing memory on worker processors, which means the "reset" implementation may be flawed. However, the change proposed in this PR is still appropriate in principle and improvements to the reset functionality can be improved in the future.Checklist
doc
folder.pyproject.toml
.