ValeevGroup / BTAS

Basic Tensor Algebra Subroutines
http://itensor.org/btas
BSD 3-Clause "New" or "Revised" License
46 stars 19 forks source link

Fix the issue found in Flatten #168

Closed kmp5VT closed 10 months ago

kmp5VT commented 11 months ago

An issue found in calling update_w_KRP without MKL see https://github.com/ValeevGroup/BTAS/issues/167. To fix the problem I no longer call the flatten function. Now I just push the transpose work on the contract function. I also rewrote the Flatten code to work properly by taking an order-N tensor and flattening it to an order-3 tensor with dimensions (modes_before_n, n, modes_after_n) and then I "permute" the tensor into the flattened order during the copy stage.

evaleev commented 10 months ago

@kshitij-05 have a look at the remaining failures, all seem to be ZCP (no more CP failures), indeed perhaps sitting too close to the edge?

kmp5VT commented 10 months ago

@evaleev @kshitij-05 I believe I was able to fix the issue. Looks like it was a near rank problem. I just turned up the rank slightly for these problems (I increased the rank by 2)