Open sjsprecious opened 3 weeks ago
The state
should be completely reusable without any zeroing, from my understanding. The fact that it isn't is a problem
Thanks Kyle for the clarification. I looked at these two lines https://github.com/NCAR/micm/blob/main/include/micm/solver/lu_decomposition.inl#L201 and https://github.com/NCAR/micm/blob/main/include/micm/solver/lu_decomposition.inl#L214. Could the Uvector
use the values from the previous time step without a zeroing?
We set them just before those, but it's in an if block so maybe not all of the values are zeros. Perhaps we should add back a zero of L and U
Thanks @K20shores for your comments. Hmm, interesting. For the first time when the State
variable is generated, are the L and U matrices zeroed?
As identified by this issue https://github.com/NCAR/MUSICA-Performance-Comparison/issues/62, if we reuse the
State
variable between different iterations ofsolve
function, the results are corrupt and we getfail to converge
error message later.Kyle commented that this was also the reason why he had to initialize the LU matrix to zero originally (https://github.com/NCAR/micm/issues/587).
This issue indicates that the LU matrix in
State
variable is not overwritten correctly between iterations (or we should not expect it to be overwritten correctly at all?).