Skip to content

Commit 20871ce

Browse files
authored
Fix a bug caused by libtorch>=2.6.0. (#6461)
* Fix a bug caused by libtorch>=2.6.0. * Update docs.
1 parent 41b5045 commit 20871ce

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/quick_start/easy_install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export CMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix
261261
And, follow the instructions in [Build and Install](#build-and-install) part above withou manually setting paths to dependencies.
262262
See [the advanced installation guide](../advanced/install.md) for more features.
263263
Make sure the environment variables are set before running `cmake`.
264-
Possible command: `cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON`.
264+
Possible command: `cmake -B build -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON`.
265265

266266
## Command line options
267267

source/source_lcao/module_deepks/deepks_basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void DeePKS_domain::cal_gevdm(const int nat,
3131
// repeat each block for nm times in an additional dimension
3232
torch::Tensor tmp_x = pdm[inl].reshape({nm, nm}).unsqueeze(0).repeat({nm, 1, 1});
3333
// torch::Tensor tmp_y = std::get<0>(torch::symeig(tmp_x, true));
34-
torch::Tensor tmp_y = std::get<0>(torch::linalg::eigh(tmp_x, "U"));
34+
torch::Tensor tmp_y = std::get<0>(torch::linalg_eigh(tmp_x, "U"));
3535
torch::Tensor tmp_yshell = torch::eye(nm, torch::TensorOptions().dtype(torch::kFloat64));
3636
std::vector<torch::Tensor> tmp_rpt; // repeated-pdm-tensor (x)
3737
std::vector<torch::Tensor> tmp_rdt; // repeated-d-tensor (y)

source/source_lcao/module_deepks/deepks_descriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void DeePKS_domain::cal_descriptor(const int nat,
6565
std::tuple<torch::Tensor, torch::Tensor> d_v(descriptor[inl], vd);
6666
// d_v = torch::symeig(pdm[inl], /*eigenvalues=*/true,
6767
// /*upper=*/true);
68-
d_v = torch::linalg::eigh(pdm[inl], /*uplo*/ "U");
68+
d_v = torch::linalg_eigh(pdm[inl], /*uplo*/ "U");
6969
descriptor[inl] = std::get<0>(d_v);
7070
}
7171
ModuleBase::timer::tick("DeePKS_domain", "cal_descriptor");

toolchain/build_abacus_intel.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
4848
-DENABLE_RAPIDJSON=ON \
4949
-DRapidJSON_DIR=$RAPIDJSON \
5050
-DLIBRI_DIR=$LIBRI \
51-
-DLIBCOMM_DIR=$LIBCOMM \
52-
# -DENABLE_DEEPKS=1 \
51+
-DLIBCOMM_DIR=$LIBCOMM \
52+
# -DENABLE_MLALGO=1 \
5353
# -DTorch_DIR=$LIBTORCH \
5454
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
55-
# -DENABLE_LIBRI=ON \
56-
# -DDeePMD_DIR=$DEEPMD \
55+
# -DENABLE_LIBRI=ON \
56+
# -DDeePMD_DIR=$DEEPMD \
5757
# -DUSE_CUDA=ON \
5858
# -DENABLE_CUSOLVERMP=ON \
5959
# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib

0 commit comments

Comments
 (0)