Closed hmenke closed 1 year ago
Error No. 1 This is a self-assignment to the parameter and will not update the member variable k
.
Proposed solution: Rename the parameter to k_
and do k = k_;
or use this->k = k;
.
This would have been caught immediately if the parameter was made constant (long const k
).
Error No. 2 This will never shrink wk
, but this means that wk.ksi
will never shrink. This leads to size confusion when a triple insertion is followed by a double insertion.
Proposed solution: Restore the old code maybe?
@hmenke Thank you for pointing out this issue with the merge.
Regarding the second point:
It shouldn't be a problem that wk never shrinks?
We access into the underlying matrices always through proper indexing or sliced views, or am I wrong?
Not shrinking wk when jumping between say triple and double inserts avoids unnecessary reallocations.
kmax
was introduced for that reason, similar to Nmax
.
The else-branch in wk.det_ksi()
and pretty much all accesses to wk.ksi
are not performed by range.
Many more like the following:
I have addressed the above points in https://github.com/TRIQS/triqs/commit/232cbe0be8a4418567411474931c1e40a06fb819 Could you please have a look try that with your example? Also, would it be possible that you extend the tests of your initial PR to cover the failures you mention?
All related issues are addressed in the current unstable branch
Prerequisites
Description
Higher-rank updates was merged after some extensive refactoring which seems to have broken the feature.
Steps to Reproduce
Consider the Dimer benchmark with these additional changes:
This crashes CT-Int with
Expected behavior: Script completes normally.
Actual behavior: Assertion is triggered.
Versions