If the SVD algorithm gesdd fails, try gesvd instead.#386
If the SVD algorithm gesdd fails, try gesvd instead.#386mtfishman merged 2 commits intoITensor:v3from
Conversation
|
Great, thanks! Did you check that this fixes issues that you were seeing? |
|
No unfortunately I would have to start a calculation on the cluster, I think sophie might try it, because she has set up everything with the exact parameters that caused the problem. |
|
Ok, do you want to wait to confirm that this fixes the problems you were seeing before merging? I still think it's useful, but maybe there is something else going on in the case you were seeing as well. |
|
Hi, I have been using gesdd and gesvd for ITensors for a long time (using a custom svd implementation based on Armadillo's wrapper of LAPACK, where I have implemented similar fallback). I want to add that gesdd fails pretty often and the parameters for which it happens entirely depends on underlying LAPACK implementation as well as the CPU running it, older CPU without AVX512 fails more often for Intel MKL. However, the above technique of falling back to gesvd always works. |
|
That's helpful, thanks! |
…first and if this fails uses gesvd instead.
|
Hi, As we discussed, I added a default SVDMethod flag called "automatic". An SVD called with this flag first uses gesdd and if that fails it tries gesvd. I also found a problem in my original commit: gesdd destroys the data and if it fails the data needs to be reinitialized. I tested that all flags work as expected using print statements For our workflow it would be simplest to put this change into ITensor since I am not runing the calculation that previously failed. Cheers Daniel |
|
Thanks Daniel! Looks good, I'll merge. I'll need to add the same feature to the Julia version. |
hopefully a simple fix for some larger computations.