Skip to content

Commit 19c9f73

Browse files
authored
Merge branch 'develop' into fft11
2 parents 3301b52 + 2b23c18 commit 19c9f73

File tree

73 files changed

+5751
-2371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+5751
-2371
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ time.json
2121
*.pyc
2222
__pycache__
2323
abacus.json
24-
*.npy
24+
*.npy
25+
toolchain/install/
26+
toolchain/abacus_env.sh

CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,19 @@ if(USE_CUDA)
352352
endif()
353353
if (ENABLE_CUSOLVERMP)
354354
add_compile_definitions(__CUSOLVERMP)
355+
find_library(CAL_LIBRARY
356+
NAMES cal
357+
PATHS ${CAL_CUSOLVERMP_PATH}
358+
NO_DEFAULT_PATH
359+
)
360+
find_library(CUSOLVERMP_LIBRARY
361+
NAMES cusolverMp
362+
PATHS ${CAL_CUSOLVERMP_PATH}
363+
NO_DEFAULT_PATH
364+
)
355365
target_link_libraries(${ABACUS_BIN_NAME}
356-
cal
357-
cusolverMp
366+
${CAL_LIBRARY}
367+
${CUSOLVERMP_LIBRARY}
358368
)
359369
endif()
360370
endif()

docs/quick_start/easy_install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Here, 'build' is the path for building ABACUS; and '-D' is used for setting up s
106106
- `CMAKE_INSTALL_PREFIX`: the path of ABACUS binary to install; `/usr/local/bin/abacus` by default
107107
- Compilers
108108
- `CMAKE_CXX_COMPILER`: C++ compiler; usually `g++`(GNU C++ compiler) or `icpx`(Intel C++ compiler). Can also set from environment variable `CXX`. It is OK to use MPI compiler here.
109-
- `MPI_CXX_COMPILER`: MPI wrapper for C++ compiler; usually `mpicxx` or `mpiicpc`(for Intel MPI).
109+
- `MPI_CXX_COMPILER`: MPI wrapper for C++ compiler; usually `mpicxx` or `mpiicpx`(for Intel toolkits) or `mpiicpc`(for classic Intel Compiler Classic MPI before 2024.0).
110110
- Requirements: Unless indicated, CMake will try to find under default paths.
111111
- `MKLROOT`: If environment variable `MKLROOT` exists, `cmake` will take MKL as a preference, i.e. not using `LAPACK`, `ScaLAPACK` and `FFTW`. To disable MKL, unset environment variable `MKLROOT`, or pass `-DMKLROOT=OFF` to `cmake`.
112112
- `LAPACK_DIR`: Path to OpenBLAS library `libopenblas.so`(including BLAS and LAPACK)
@@ -136,7 +136,7 @@ Here, 'build' is the path for building ABACUS; and '-D' is used for setting up s
136136
Here is an example:
137137

138138
```bash
139-
CXX=mpiicpc cmake -B build -DCMAKE_INSTALL_PREFIX=~/abacus -DELPA_DIR=~/elpa-2016.05.004/build -DCEREAL_INCLUDE_DIR=~/cereal/include
139+
CXX=mpiicpx cmake -B build -DCMAKE_INSTALL_PREFIX=~/abacus -DELPA_DIR=~/elpa-2025.01.001/build -DCEREAL_INCLUDE_DIR=~/cereal/include
140140
```
141141

142142
## Build and Install

python/pyabacus/CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ list(APPEND _diago
190190
${HSOLVER_PATH}/diag_const_nums.cpp
191191
${HSOLVER_PATH}/diago_iter_assist.cpp
192192
${HSOLVER_PATH}/kernels/dngvd_op.cpp
193+
${HSOLVER_PATH}/kernels/bpcg_kernel_op.cpp
193194
${BASE_PATH}/kernels/math_kernel_op.cpp
194-
${BASE_PATH}/kernels/math_op.cpp
195+
${BASE_PATH}/kernels/math_kernel_op_vec.cpp
196+
${BASE_PATH}/kernels/math_ylm_op.cpp
195197
${BASE_PATH}/module_device/device.cpp
196198
${BASE_PATH}/module_device/memory_op.cpp
197199
${PSI_PATH}/psi.cpp

python/pyabacus/src/ModuleBase/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
list(APPEND pymodule_base
22
${PROJECT_SOURCE_DIR}/src/ModuleBase/py_base_math.cpp
3-
${BASE_PATH}/kernels/math_op.cpp
3+
${BASE_PATH}/kernels/math_ylm_op.cpp
44
${BASE_PATH}/kernels/math_kernel_op.cpp
5+
${BASE_PATH}/kernels/math_kernel_op_vec.cpp
56
${BASE_PATH}/module_device/memory_op.cpp
67
${BASE_PATH}/module_device/device.cpp
78
)

python/pyabacus/src/ModuleNAO/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ list(APPEND _naos
1313
${NAO_PATH}/two_center_integrator.cpp
1414
${NAO_PATH}/two_center_table.cpp
1515
# dependency
16-
${ABACUS_SOURCE_DIR}/module_base/kernels/math_op.cpp
16+
${ABACUS_SOURCE_DIR}/module_base/kernels/math_ylm_op.cpp
1717
${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op.cpp
18+
${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op_vec.cpp
1819
# ${ABACUS_SOURCE_DIR}/module_psi/kernels/psi_memory_op.cpp
1920
${ABACUS_SOURCE_DIR}/module_base/module_device/memory_op.cpp
2021
${ABACUS_SOURCE_DIR}/module_base/module_device/device.cpp

python/pyabacus/src/hsolver/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ list(APPEND _diago
1010

1111

1212
${HSOLVER_PATH}/kernels/dngvd_op.cpp
13+
${HSOLVER_PATH}/kernels/bpcg_kernel_op.cpp
1314
# dependency
1415
${BASE_PATH}/kernels/math_kernel_op.cpp
15-
${BASE_PATH}/kernels/math_op.cpp
16+
${BASE_PATH}/kernels/math_kernel_op_vec.cpp
17+
${BASE_PATH}/kernels/math_ylm_op.cpp
1618
${BASE_PATH}/module_device/device.cpp
1719
${BASE_PATH}/module_device/memory_op.cpp
1820

source/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ list(APPEND device_srcs
3636
module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp
3737
module_basis/module_pw/kernels/pw_op.cpp
3838
module_hsolver/kernels/dngvd_op.cpp
39+
module_hsolver/kernels/bpcg_kernel_op.cpp
3940
module_elecstate/kernels/elecstate_op.cpp
4041

4142
# module_psi/kernels/psi_memory_op.cpp
@@ -44,13 +45,14 @@ list(APPEND device_srcs
4445
module_base/module_device/device.cpp
4546
module_base/module_device/memory_op.cpp
4647
module_base/kernels/math_kernel_op.cpp
48+
module_base/kernels/math_kernel_op_vec.cpp
4749

4850
module_hamilt_pw/hamilt_pwdft/kernels/force_op.cpp
4951
module_hamilt_pw/hamilt_pwdft/kernels/stress_op.cpp
5052
module_hamilt_pw/hamilt_pwdft/kernels/onsite_op.cpp
5153
module_hamilt_pw/hamilt_pwdft/kernels/wf_op.cpp
5254
module_hamilt_pw/hamilt_pwdft/kernels/vnl_op.cpp
53-
module_base/kernels/math_op.cpp
55+
module_base/kernels/math_ylm_op.cpp
5456
module_hamilt_general/module_xc/kernels/xc_functional_op.cpp
5557
)
5658

@@ -64,6 +66,7 @@ if(USE_CUDA)
6466
module_hamilt_pw/hamilt_pwdft/kernels/cuda/onsite_op.cu
6567
module_basis/module_pw/kernels/cuda/pw_op.cu
6668
module_hsolver/kernels/cuda/dngvd_op.cu
69+
module_hsolver/kernels/cuda/bpcg_kernel_op.cu
6770
module_elecstate/kernels/cuda/elecstate_op.cu
6871

6972
# module_psi/kernels/cuda/memory_op.cu
@@ -73,8 +76,9 @@ if(USE_CUDA)
7376
module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu
7477
module_hamilt_pw/hamilt_pwdft/kernels/cuda/wf_op.cu
7578
module_hamilt_pw/hamilt_pwdft/kernels/cuda/vnl_op.cu
76-
module_base/kernels/cuda/math_op.cu
79+
module_base/kernels/cuda/math_ylm_op.cu
7780
module_base/kernels/cuda/math_kernel_op.cu
81+
module_base/kernels/cuda/math_kernel_op_vec.cu
7882
module_hamilt_general/module_xc/kernels/cuda/xc_functional_op.cu
7983
)
8084
endif()
@@ -89,6 +93,7 @@ if(USE_ROCM)
8993
module_hamilt_pw/hamilt_stodft/kernels/rocm/hpsi_norm_op.hip.cu
9094
module_basis/module_pw/kernels/rocm/pw_op.hip.cu
9195
module_hsolver/kernels/rocm/dngvd_op.hip.cu
96+
module_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu
9297
module_elecstate/kernels/rocm/elecstate_op.hip.cu
9398

9499
# module_psi/kernels/rocm/memory_op.hip.cu
@@ -99,7 +104,8 @@ if(USE_ROCM)
99104
module_hamilt_pw/hamilt_pwdft/kernels/rocm/wf_op.hip.cu
100105
module_hamilt_pw/hamilt_pwdft/kernels/rocm/vnl_op.hip.cu
101106
module_base/kernels/rocm/math_kernel_op.hip.cu
102-
module_base/kernels/rocm/math_op.hip.cu
107+
module_base/kernels/rocm/math_kernel_op.hip_vec.cu
108+
module_base/kernels/rocm/math_ylm_op.hip.cu
103109
module_hamilt_general/module_xc/kernels/rocm/xc_functional_op.hip.cu
104110
)
105111
endif()

source/Makefile.Objects

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ OBJS_BASE=abfs-vector3_order.o\
146146
math_ylmreal.o\
147147
math_bspline.o\
148148
math_chebyshev.o\
149-
math_op.o\
149+
math_ylm_op.o\
150150
math_kernel_op.o\
151+
math_kernel_op_vec.o\
151152
mathzone_add1.o\
152153
matrix.o\
153154
matrix3.o\
@@ -349,6 +350,7 @@ OBJS_HSOLVER=diago_cg.o\
349350
hsolver_pw_sdft.o\
350351
diago_iter_assist.o\
351352
dngvd_op.o\
353+
bpcg_kernel_op.o\
352354
diag_const_nums.o\
353355
diag_hs_para.o\
354356
diago_pxxxgvx.o\
@@ -441,8 +443,10 @@ OBJS_RELAXATION=bfgs_basic.o\
441443
lattice_change_methods.o\
442444
relax_old.o\
443445
relax.o\
444-
line_search.o\
445446
bfgs.o\
447+
lbfgs.o\
448+
matrix_methods.o\
449+
line_search.o\
446450

447451

448452
OBJS_SURCHEM=surchem.o\

0 commit comments

Comments
 (0)