Segment fault from zero-size RI::Tensor in PCA
Describe the bug
example (provided by @YuLiu98): abfs-pca-zero-size-tensor.tar.gz
The LibRI data container RI::Tensor does not support zero size in design (the member data of type std::shared_ptr will be nullptr, failing lots of internal assertions.
So maybe we should focus on why get_sub_matrix in cal_PCA produces a zero-size tensor. @PeizeLin
The bug is introduced by the basis 1s1p0d.
If you change the beginning of orbital files to 1s1p, the code works well.
I'll fix it later. @YuLiu98 You can just edit the orbital files temporarily.
The bug is introduced by the basis
1s1p0d. If you change the beginning of orbital files to1s1p, the code works well.I'll fix it later. @YuLiu98 You can just edit the orbital files temporarily.
OK, I got it. Thank you @PeizeLin
fixed in #5152