Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b69c085
Refactor: Encapsulate timer functionality in timer_wrapper.h
Jan 23, 2026
3829268
Refactor timer code and clean_esolver function
Jan 23, 2026
6fbf3dc
Merge branch 'develop' of github.com:mohanchen/abacus-mc into develop
Jan 24, 2026
ddafac6
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 25, 2026
202eac6
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 25, 2026
44a271b
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 25, 2026
2ac905d
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 25, 2026
1a0f1b4
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 27, 2026
47998bb
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 27, 2026
97c89da
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 28, 2026
fcbc6ab
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 28, 2026
fdd2606
Merge branch 'deepmodeling:develop' into develop
mohanchen Jan 31, 2026
3aa510e
Merge branch 'deepmodeling:develop' into develop
mohanchen Feb 1, 2026
a11361e
add module_energy directory
Feb 1, 2026
a18f0f2
Merge branch 'deepmodeling:develop' into develop
mohanchen Feb 2, 2026
16a65d2
updates
Feb 3, 2026
11938fe
Rename json_output to module_json and move para_json files, update in…
Feb 3, 2026
75775ec
Merge branch 'deepmodeling:develop' into develop
mohanchen Feb 7, 2026
ba64c35
Update CMakeLists.txt: change json_output to module_json
Feb 7, 2026
a9db0b1
Merge branch 'develop' into 20260203
mohanchen Feb 7, 2026
08370ea
Fix CMakeLists.txt: update source_io file paths to module_output dire…
Feb 7, 2026
d556f85
Fix csr_reader.h include paths: update to module_output directory
Feb 7, 2026
92afac8
fix bugs related to libxc
Feb 8, 2026
03983eb
fix
Feb 8, 2026
0da1a53
fix
Feb 8, 2026
f2a83e9
fix several CMakeLists
Feb 8, 2026
e256f0c
update CMake and other test files
Feb 8, 2026
2df5f84
Merge branch 'deepmodeling:develop' into develop
mohanchen Feb 8, 2026
3343370
update cmakelists
Feb 8, 2026
cc881a9
Merge branch 'develop' of github.com:mohanchen/abacus-mc into develop
Feb 8, 2026
26433bb
solve conflict
Feb 8, 2026
b6fcfa7
fix bugs
Feb 8, 2026
80b74c1
Fix: Correct para_json.cpp path in test CMakeLists.txt
Feb 8, 2026
b84febd
fix cmake
Feb 8, 2026
7c0865c
fix
Feb 8, 2026
0c811ee
fix
Feb 8, 2026
e9de93e
fix
Feb 8, 2026
468dd53
fix
Feb 8, 2026
0a5aaa4
fix
Feb 8, 2026
019b502
json!
Feb 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 62 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,63 @@ if(NOT ENABLE_MPI)
endif()

# Different exe files of ABACUS
if(ENABLE_LCAO AND ENABLE_MPI)
set(ABACUS_BIN_NAME abacus)
elseif(NOT ENABLE_LCAO AND ENABLE_MPI)
set(ABACUS_BIN_NAME abacus_pw)
elseif(NOT ENABLE_LCAO AND NOT ENABLE_MPI)
set(ABACUS_BIN_NAME abacus_pw_serial)
elseif(ENABLE_LCAO AND NOT ENABLE_MPI)
set(ABACUS_BIN_NAME abacus_serial)
unset(ABACUS_BIN_NAME CACHE)

# Case : LCAO or PW
if(ENABLE_LCAO)
# Case: CUDA is enabled (suffix with 'g' for GPU)
if(USE_CUDA)
if(ENABLE_MPI)
if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_2g)
elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_3g)
elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_4g)
elseif(ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_5g)
endif()
endif()
# Case: CPU is enabled (suffix with 'p' for parallel)
else()
if(ENABLE_MPI)
if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_2p)
elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_3p)
elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_4p)
elseif(ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_5p)
endif()
else()
if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_2s)
elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_3s)
elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_4s)
elseif(ENABLE_LIBRI AND ENABLE_MLALGO)
set(ABACUS_BIN_NAME abacus_5s)
endif()
endif()
endif()
# Case : PW only
else()
if(USE_CUDA)
if(ENABLE_MPI)
set(ABACUS_BIN_NAME abacus_1g)
endif()
else()
if(ENABLE_MPI)
set(ABACUS_BIN_NAME abacus_1p)
else()
set(ABACUS_BIN_NAME abacus_1s)
endif()
endif()
endif()


# Use DSP hardware
if (USE_DSP)
set(USE_ELPA OFF)
Expand Down Expand Up @@ -488,12 +535,12 @@ elseif(NOT USE_SW)
find_package(Lapack REQUIRED)
include_directories(${FFTW3_INCLUDE_DIRS})
list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK BLAS::BLAS)
if(USE_DSP)
target_link_libraries(${ABACUS_BIN_NAME} ${SCALAPACK_LIBRARY_DIR})
else()
find_package(ScaLAPACK REQUIRED)
list(APPEND math_libs ScaLAPACK::ScaLAPACK)
endif()
if(USE_DSP)
target_link_libraries(${ABACUS_BIN_NAME} ${SCALAPACK_LIBRARY_DIR})
else()
find_package(ScaLAPACK REQUIRED)
list(APPEND math_libs ScaLAPACK::ScaLAPACK)
endif()
if(USE_OPENMP)
list(APPEND math_libs FFTW3::FFTW3_OMP)
endif()
Expand Down Expand Up @@ -735,7 +782,7 @@ if(ENABLE_LCAO)
target_link_libraries(${ABACUS_BIN_NAME} genelpa)
endif()
if(USE_CUDA)
target_link_libraries(diag_cusolver)
target_link_libraries(${ABACUS_BIN_NAME} diag_cusolver)
endif()
endif()
if(ENABLE_RAPIDJSON)
Expand Down
20 changes: 10 additions & 10 deletions source/source_basis/module_nao/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AddTest(
../numerical_radial.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -29,7 +29,7 @@ AddTest(
../numerical_radial.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -42,7 +42,7 @@ AddTest(
../numerical_radial.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -55,7 +55,7 @@ AddTest(
../numerical_radial.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -68,7 +68,7 @@ AddTest(
../numerical_radial.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -86,7 +86,7 @@ AddTest(
../sphbes_radials.cpp
../../module_ao/ORB_atomic_lm.cpp
../../module_ao/ORB_atomic.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base
)

Expand All @@ -106,7 +106,7 @@ AddTest(
../two_center_bundle.cpp
../two_center_integrator.cpp
../real_gaunt_table.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base container orb
)

Expand Down Expand Up @@ -135,7 +135,7 @@ AddTest(
../radial_set.cpp
../numerical_radial.cpp
../two_center_bundle.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base container orb
)

Expand All @@ -155,7 +155,7 @@ AddTest(
../sphbes_radials.cpp
../radial_set.cpp
../numerical_radial.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base container orb
)

Expand All @@ -175,7 +175,7 @@ AddTest(
../sphbes_radials.cpp
../radial_set.cpp
../numerical_radial.cpp
../../../source_io/orb_io.cpp
../../../source_io/module_output/orb_io.cpp
LIBS parameter ${math_libs} device base container orb
)

4 changes: 2 additions & 2 deletions source/source_esolver/esolver_dm2rho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "source_lcao/LCAO_domain.h"
#include "source_lcao/hamilt_lcao.h"
#include "source_lcao/module_operator_lcao/operator_lcao.h"
#include "source_io/cube_io.h"
#include "../source_io/module_ml/io_npz.h"
#include "source_io/module_output/cube_io.h"
#include "source_io/module_ml/io_npz.h"
#include "source_io/module_output/print_info.h"
#include "source_lcao/rho_tau_lcao.h" // mohan add 2025-10-24

Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_dp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "source_base/parallel_common.h"
#include "source_base/timer.h"
#include "source_io/module_output/output_log.h"
#include "source_io/cif_io.h"
#include "source_io/module_output/cif_io.h"

#include <iomanip>
#include <sstream>
Expand Down
8 changes: 4 additions & 4 deletions source/source_esolver/esolver_fp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include "source_estate/read_pseudo.h"
#include "source_hamilt/module_ewald/H_Ewald_pw.h"
#include "source_hamilt/module_vdw/vdw.h"
#include "source_io/cif_io.h"
#include "source_io/cube_io.h" // use write_vdata_palgrid
#include "source_io/json_output/init_info.h"
#include "source_io/json_output/output_info.h"
#include "source_io/module_output/cif_io.h"
#include "source_io/module_output/cube_io.h" // use write_vdata_palgrid
#include "source_io/module_json/init_info.h"
#include "source_io/module_json/output_info.h"
#include "source_io/module_output/output_log.h"
#include "source_io/module_output/print_info.h"
#include "source_io/module_chgpot/rhog_io.h"
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_gets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "source_lcao/LCAO_domain.h"
#include "source_lcao/hamilt_lcao.h"
#include "source_lcao/module_operator_lcao/operator_lcao.h"
#include "source_io/cal_r_overlap_R.h"
#include "source_io/module_hs/cal_r_overlap_R.h"
#include "source_io/module_output/print_info.h"
#include "source_io/module_hs/write_HS_R.h"

Expand Down
8 changes: 4 additions & 4 deletions source/source_esolver/esolver_ks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#include "source_base/timer_wrapper.h"

// for jason output information
#include "source_io/json_output/init_info.h"
#include "source_io/json_output/output_info.h"
#include "source_io/module_json/init_info.h"
#include "source_io/module_json/output_info.h"

#include "source_estate/update_pot.h" // mohan add 20251016
#include "source_estate/module_charge/chgmixing.h" // mohan add 20251018
#include "source_pw/module_pwdft/setup_pwwfc.h" // mohan add 20251018
#include "source_hsolver/hsolver.h"
#include "source_io/write_eig_occ.h"
#include "source_io/write_bands.h"
#include "source_io/module_energy/write_eig_occ.h"
#include "source_io/module_energy/write_bands.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_output/output_log.h" // use write_head
#include "source_estate/elecstate_print.h" // print_etot
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_ks_lcao_tddft.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "esolver_ks_lcao_tddft.h"

//----------------IO-----------------
#include "source_io/dipole_io.h"
#include "source_io/module_dipole/dipole_io.h"
#include "source_io/module_ctrl/ctrl_output_td.h"
#include "source_io/module_current/td_current_io.h"
#include "source_io/module_output/output_log.h"
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_lj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "source_cell/module_neighbor/sltk_atom_arrange.h"
#include "source_cell/module_neighbor/sltk_grid_driver.h"
#include "source_io/module_output/output_log.h"
#include "source_io/cif_io.h"
#include "source_io/module_output/cif_io.h"


namespace ModuleESolver
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_nep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "source_base/parallel_common.h"
#include "source_base/timer.h"
#include "source_io/module_output/output_log.h"
#include "source_io/cif_io.h"
#include "source_io/module_output/cif_io.h"

#include <numeric>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_of.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "esolver_of.h"

#include "source_io/module_parameter/parameter.h"
#include "source_io/cube_io.h"
#include "source_io/module_output/cube_io.h"
#include "source_io/module_output/output_log.h"
#include "source_io/module_chgpot/write_elecstat_pot.h"
//-----------temporary-------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_of_tddft.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "esolver_of_tddft.h"

#include "source_io/module_parameter/parameter.h"
#include "source_io/cube_io.h"
#include "source_io/module_output/cube_io.h"
#include "source_io/module_output/output_log.h"
#include "source_io/module_chgpot/write_elecstat_pot.h"
//-----------temporary-------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#endif

// mohan add 2025-03-06
#include "source_io/cal_test.h"
#include "source_io/module_output/cal_test.h"

namespace ModuleESolver
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/pw_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "source_base/formatter.h"

// mohan add 2025-03-06
#include "source_io/cal_test.h"
#include "source_io/module_output/cal_test.h"

namespace ModuleESolver {

Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
AddTest(
TARGET esolver_dp_test
LIBS parameter ${math_libs} base device
SOURCES esolver_dp_test.cpp ../esolver_dp.cpp ../../source_io/cif_io.cpp ../../source_io/module_output/output_log.cpp
SOURCES esolver_dp_test.cpp ../esolver_dp.cpp ../../source_io/module_output/cif_io.cpp ../../source_io/module_output/output_log.cpp
)
2 changes: 1 addition & 1 deletion source/source_estate/module_charge/charge_extra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "source_base/global_variable.h"
#include "source_base/timer.h"
#include "source_base/tool_threading.h"
#include "source_io/cube_io.h"
#include "source_io/module_output/cube_io.h"

Charge_Extra::Charge_Extra()
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_estate/module_charge/charge_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "source_base/tool_threading.h"
#include "source_estate/magnetism.h"
#include "source_pw/module_pwdft/parallel_grid.h"
#include "source_io/cube_io.h"
#include "source_io/module_output/cube_io.h"
#include "source_io/module_chgpot/rhog_io.h"
#include "source_io/module_wf/read_wf2rho_pw.h"
#include "source_io/module_restart/restart.h"
Expand Down
2 changes: 1 addition & 1 deletion source/source_estate/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ AddTest(
AddTest(
TARGET charge_extra
LIBS parameter ${math_libs} base device cell_info
SOURCES charge_extra_test.cpp ../module_charge/charge_extra.cpp ../../source_io/read_cube.cpp ../../source_io/write_cube.cpp
SOURCES charge_extra_test.cpp ../module_charge/charge_extra.cpp ../../source_io/module_output/read_cube.cpp ../../source_io/module_output/write_cube.cpp
../../source_io/module_output/output.cpp ../../source_base/module_fft/fft_bundle.cpp ../../source_base/module_fft/fft_cpu.cpp
)

Expand Down
6 changes: 3 additions & 3 deletions source/source_hsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ if(ENABLE_LCAO)
endif ()

if(USE_CUDA)
list(APPEND objects
set(cuda_objects
./kernels/hegvd_op.cpp
./kernels/cuda/diag_cusolver.cu
diago_cusolver.cpp
diago_cusolver.h
)
if(ENABLE_CUSOLVERMP)
list(APPEND objects
list(APPEND cuda_objects
./kernels/cuda/diag_cusolvermp.cu
diago_cusolvermp.cpp
diago_cusolvermp.h
Expand All @@ -53,7 +53,7 @@ if(ENABLE_LCAO)
add_library(
diag_cusolver
OBJECT
${objects}
${cuda_objects}
)
if(ENABLE_COVERAGE)
add_coverage(diag_cusolver)
Expand Down
Loading
Loading