abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

Segment fault from zero-size RI::Tensor in PCA

Open maki49 opened this issue 1 year ago • 2 comments

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

maki49 avatar Sep 11 '24 20:09 maki49

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.

PeizeLin avatar Sep 12 '24 10:09 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.

OK, I got it. Thank you @PeizeLin

YuLiu98 avatar Sep 12 '24 12:09 YuLiu98

fixed in #5152

PeizeLin avatar Dec 23 '24 02:12 PeizeLin