Skip to content
Merged
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
14 changes: 14 additions & 0 deletions source/module_io/read_input_item_elec_stru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,23 @@ void ReadInput::item_elec_stru()
}
else if (ks_solver == "cusolver" || ks_solver == "cusolvermp")
{
std::string warningstr;
#ifndef __MPI
ModuleBase::WARNING_QUIT("ReadInput", "Cusolver can not be used for series version.");
#endif
#ifndef __CUDA
warningstr = "ks_solver is set to " + ks_solver + " but ABACUS is built with CPU only!\n"
+ " Please rebuild ABACUS with GPU support or change the ks_solver.";
ModuleBase::WARNING_QUIT("ReadInput", warningstr);
#endif
if( ks_solver == "cusolvermp")
{
#ifndef __CUSOLVERMP
warningstr = "ks_solver is set to cusolvermp, but ABACUS is not built with cusolvermp support\n"
" Please rebuild ABACUS with cusolvermp support or change the ks_solver.";
ModuleBase::WARNING_QUIT("ReadInput", warningstr);
#endif
}
}
else if (ks_solver == "pexsi")
{
Expand Down
Loading