Skip to content

Commit 436c908

Browse files
committed
modify warning output
1 parent 5b19d01 commit 436c908

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/module_io/read_input_item_elec_stru.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ void ReadInput::item_elec_stru()
124124
{
125125
#ifndef __MPI
126126
ModuleBase::WARNING_QUIT("ReadInput", "Cusolver can not be used for series version.");
127+
#endif
128+
#ifndef __CUDA
129+
std::string warningstr = "ks_solver is set to " + ks_solver + " but ABACUS is built with CPU only!\n"
130+
+ " Please rebuild ABACUS with GPU support or change the ks_solver.";
131+
ModuleBase::WARNING_QUIT("ReadInput", warningstr);
132+
#endif
133+
#ifndef __CUSOLVERMP
134+
std::string warningstr = "ks_solver is set to cusolvermp, but ABACUS is not built with cusolvermp support\n"
135+
" Please rebuild ABACUS with cusolvermp support or change the ks_solver.";
136+
ModuleBase::WARNING_QUIT("ReadInput", warningstr);
127137
#endif
128138
}
129139
else if (ks_solver == "pexsi")

0 commit comments

Comments
 (0)