Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@
For numerical atomic orbitals basis,

- lapack: Use LAPACK to diagonalize the Hamiltonian, only used for serial version
- genelpa: Use GEN-ELPA to diagonalize the Hamiltonian.
- genelpa: Use the CPU-only GEN-ELPA interface to diagonalize the Hamiltonian.
- 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.
Expand Down
2 changes: 1 addition & 1 deletion docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ parameters:
For numerical atomic orbitals basis,

* lapack: Use LAPACK to diagonalize the Hamiltonian, only used for serial version
* genelpa: Use GEN-ELPA to diagonalize the Hamiltonian.
* genelpa: Use the CPU-only GEN-ELPA interface to diagonalize the Hamiltonian.
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ For plane-wave basis,
For numerical atomic orbitals basis,

* lapack: Use LAPACK to diagonalize the Hamiltonian, only used for serial version
* genelpa: Use GEN-ELPA to diagonalize the Hamiltonian.
* genelpa: Use the CPU-only GEN-ELPA interface to diagonalize the Hamiltonian.
* 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.
Expand Down Expand Up @@ -164,6 +164,13 @@ Then the user has to correct the input file and restart the calculation.)";
}
else if (ks_solver == "genelpa")
{
if (para.input.device == "gpu")
{
ModuleBase::WARNING_QUIT(
"ReadInput",
"ks_solver = genelpa does not support GPU acceleration. "
"Please use ks_solver = elpa with device = gpu.");
}
#ifndef __ELPA
ModuleBase::WARNING_QUIT("Input",
"Can not use genelpa if abacus is not compiled with "
Expand Down
8 changes: 8 additions & 0 deletions source/source_io/test_serial/read_input_item_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ TEST_F(InputTest, Item_test)
param.input.device = "gpu";
it->second.reset_value(it->second, param);
EXPECT_EQ(param.input.ks_solver, "cusolver");

param.input.ks_solver = "genelpa";
param.input.basis_type = "lcao";
param.input.device = "gpu";
testing::internal::CaptureStdout();
EXPECT_EXIT(it->second.check_value(it->second, param), ::testing::ExitedWithCode(1), "");
output = testing::internal::GetCapturedStdout();
EXPECT_THAT(output, testing::HasSubstr("Please use ks_solver = elpa with device = gpu"));
#ifdef __ELPA
param.input.towannier90 = true;
param.input.basis_type = "lcao_in_pw";
Expand Down
Loading