From 737ce906b3e0cb61eefbc5ff5df81833a284da6e Mon Sep 17 00:00:00 2001 From: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:09:05 +0800 Subject: [PATCH 1/4] Update default value for ks_solver --- docs/parameters.yaml | 4 ++-- .../module_parameter/read_input_item_elec_stru.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 1e8f2be296..67c5cec902 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -509,7 +509,7 @@ parameters: ``text genelpa can not be used with plane wave basis. `` Then the user has to correct the input file and restart the calculation. - default_value: "" + default_value: "\n - PW basis: cg.\n - LCAO basis:\n - genelpa (if compiling option `USE_ELPA` has been set)\n - lapack (if compiling option `ENABLE_MPI` has not been set)\n - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set)\n - cusolver (if compiling option `USE_CUDA` has been set)" unit: "" availability: "" - name: nbands @@ -942,7 +942,7 @@ parameters: Only useful when you use ks_solver = cg/dav/dav_subspace/bpcg. It indicates the maximal iteration number for cg/david/dav_subspace/bpcg method. default_value: "50" unit: "" - availability: "basis_type==pw, ks_solver== cg/dav/dav_subspace/bpcg" + availability: "basis_type==pw, ks_solver==cg/dav/dav_subspace/bpcg" - name: pw_diag_ndim category: Plane wave related variables type: Integer diff --git a/source/source_io/module_parameter/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp index c2521c0047..2ad772d70d 100644 --- a/source/source_io/module_parameter/read_input_item_elec_stru.cpp +++ b/source/source_io/module_parameter/read_input_item_elec_stru.cpp @@ -71,7 +71,13 @@ If you set ks_solver=genelpa for basis_type=pw, the program will stop with an er ``text genelpa can not be used with plane wave basis. `` Then the user has to correct the input file and restart the calculation.)"; - item.default_value = ""; + item.default_value = R"( + - PW basis: cg. + - LCAO basis: + - genelpa (if compiling option `USE_ELPA` has been set) + - lapack (if compiling option `ENABLE_MPI` has not been set) + - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set) + - cusolver (if compiling option `USE_CUDA` has been set))"; item.unit = ""; item.availability = ""; read_sync_string(input.ks_solver); From d1bcc6781b79be832f49887a83d186706a9a10fa Mon Sep 17 00:00:00 2001 From: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:11:50 +0800 Subject: [PATCH 2/4] Update default value for ks_solver --- docs/parameters.yaml | 2 +- .../module_parameter/read_input_item_elec_stru.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 67c5cec902..10cbf2a67d 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -509,7 +509,7 @@ parameters: ``text genelpa can not be used with plane wave basis. `` Then the user has to correct the input file and restart the calculation. - default_value: "\n - PW basis: cg.\n - LCAO basis:\n - genelpa (if compiling option `USE_ELPA` has been set)\n - lapack (if compiling option `ENABLE_MPI` has not been set)\n - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set)\n - cusolver (if compiling option `USE_CUDA` has been set)" + default_value: "\n - PW basis: cg.\n - LCAO basis:\n - genelpa (if compiling option `USE_ELPA` has been set)\n - lapack (if compiling option `ENABLE_MPI` has not been set)\n - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set)\n - cusolver (if compiling option `USE_CUDA` has been set)" unit: "" availability: "" - name: nbands diff --git a/source/source_io/module_parameter/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp index 2ad772d70d..5c5cfd1341 100644 --- a/source/source_io/module_parameter/read_input_item_elec_stru.cpp +++ b/source/source_io/module_parameter/read_input_item_elec_stru.cpp @@ -74,10 +74,10 @@ Then the user has to correct the input file and restart the calculation.)"; item.default_value = R"( - PW basis: cg. - LCAO basis: - - genelpa (if compiling option `USE_ELPA` has been set) - - lapack (if compiling option `ENABLE_MPI` has not been set) - - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set) - - cusolver (if compiling option `USE_CUDA` has been set))"; + - genelpa (if compiling option `USE_ELPA` has been set) + - lapack (if compiling option `ENABLE_MPI` has not been set) + - scalapack_gvx (if compiling option `USE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set) + - cusolver (if compiling option `USE_CUDA` has been set))"; item.unit = ""; item.availability = ""; read_sync_string(input.ks_solver); From f78e6dd3b022405eca62f4a3821865ede42a086e Mon Sep 17 00:00:00 2001 From: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:16:47 +0800 Subject: [PATCH 3/4] Update default value for ks_solver --- docs/parameters.yaml | 4 ++-- .../source_io/module_parameter/read_input_item_elec_stru.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 10cbf2a67d..b5df6a200a 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -502,9 +502,9 @@ parameters: * scalapack_gvx: Use Scalapack to diagonalize the Hamiltonian. * cusolver: Use CUSOLVER to diagonalize the Hamiltonian, at least one GPU is needed. * cusolvermp: Use CUSOLVER to diagonalize the Hamiltonian, supporting multi-GPU devices. Note that you should set the number of MPI processes equal to the number of GPUs. - * elpa: The ELPA solver supports both CPU and GPU. By setting the device to GPU, you can launch the ELPA solver with GPU acceleration (provided that you have installed a GPU-supported version of ELPA, which requires you to manually compile and install ELPA, and the ABACUS should be compiled with -DUSE_ELPA=ON and -DUSE_CUDA=ON). The ELPA solver also supports multi-GPU acceleration. + * elpa: The ELPA solver supports both CPU and GPU. By setting the `device` to GPU, you can launch the ELPA solver with GPU acceleration (provided that you have installed a GPU-supported version of ELPA, which requires you to manually compile and install ELPA, and the ABACUS should be compiled with -DUSE_ELPA=ON and -DUSE_CUDA=ON). The ELPA solver also supports multi-GPU acceleration. - If you set ks_solver=genelpa for basis_type=pw, the program will stop with an error message: + If you set ks_solver=`genelpa` for basis_type=`pw`, the program will stop with an error message: ``text genelpa can not be used with plane wave basis. `` diff --git a/source/source_io/module_parameter/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp index 5c5cfd1341..99800464fa 100644 --- a/source/source_io/module_parameter/read_input_item_elec_stru.cpp +++ b/source/source_io/module_parameter/read_input_item_elec_stru.cpp @@ -64,9 +64,9 @@ For numerical atomic orbitals basis, * scalapack_gvx: Use Scalapack to diagonalize the Hamiltonian. * cusolver: Use CUSOLVER to diagonalize the Hamiltonian, at least one GPU is needed. * cusolvermp: Use CUSOLVER to diagonalize the Hamiltonian, supporting multi-GPU devices. Note that you should set the number of MPI processes equal to the number of GPUs. -* elpa: The ELPA solver supports both CPU and GPU. By setting the device to GPU, you can launch the ELPA solver with GPU acceleration (provided that you have installed a GPU-supported version of ELPA, which requires you to manually compile and install ELPA, and the ABACUS should be compiled with -DUSE_ELPA=ON and -DUSE_CUDA=ON). The ELPA solver also supports multi-GPU acceleration. +* elpa: The ELPA solver supports both CPU and GPU. By setting the `device` to GPU, you can launch the ELPA solver with GPU acceleration (provided that you have installed a GPU-supported version of ELPA, which requires you to manually compile and install ELPA, and the ABACUS should be compiled with -DUSE_ELPA=ON and -DUSE_CUDA=ON). The ELPA solver also supports multi-GPU acceleration. -If you set ks_solver=genelpa for basis_type=pw, the program will stop with an error message: +If you set ks_solver=`genelpa` for basis_type=`pw`, the program will stop with an error message: ``text genelpa can not be used with plane wave basis. `` From 90761f3bc0b69fdc49f80949229dd53465dc2d50 Mon Sep 17 00:00:00 2001 From: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:18:02 +0800 Subject: [PATCH 4/4] Update default value for ks_solver --- docs/parameters.yaml | 2 +- source/source_io/module_parameter/read_input_item_elec_stru.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/parameters.yaml b/docs/parameters.yaml index b5df6a200a..3cc2e3038e 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -493,7 +493,7 @@ parameters: * cg: The conjugate-gradient (CG) method. * bpcg: The BPCG method, which is a block-parallel Conjugate Gradient (CG) method, typically exhibits higher acceleration in a GPU environment. * dav: The Davidson algorithm. - * dav_subspace: The Davidson algorithm without orthogonalization operation, this method is the most recommended for efficiency. pw_diag_ndim can be set to 2 for this method. + * dav_subspace: The Davidson algorithm without orthogonalization operation, this method is the most recommended for efficiency. `pw_diag_ndim` can be set to 2 for this method. For numerical atomic orbitals basis, diff --git a/source/source_io/module_parameter/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp index 99800464fa..0fe7ad35aa 100644 --- a/source/source_io/module_parameter/read_input_item_elec_stru.cpp +++ b/source/source_io/module_parameter/read_input_item_elec_stru.cpp @@ -55,7 +55,7 @@ For plane-wave basis, * cg: The conjugate-gradient (CG) method. * bpcg: The BPCG method, which is a block-parallel Conjugate Gradient (CG) method, typically exhibits higher acceleration in a GPU environment. * dav: The Davidson algorithm. -* dav_subspace: The Davidson algorithm without orthogonalization operation, this method is the most recommended for efficiency. pw_diag_ndim can be set to 2 for this method. +* dav_subspace: The Davidson algorithm without orthogonalization operation, this method is the most recommended for efficiency. `pw_diag_ndim` can be set to 2 for this method. For numerical atomic orbitals basis,