File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,23 @@ void ReadInput::item_elec_stru()
122122 }
123123 else if (ks_solver == " cusolver" || ks_solver == " cusolvermp" )
124124 {
125+ std::string warningstr;
125126#ifndef __MPI
126127 ModuleBase::WARNING_QUIT (" ReadInput" , " Cusolver can not be used for series version." );
127128#endif
129+ #ifndef __CUDA
130+ warningstr = " ks_solver is set to " + ks_solver + " but ABACUS is built with CPU only!\n "
131+ + " Please rebuild ABACUS with GPU support or change the ks_solver." ;
132+ ModuleBase::WARNING_QUIT (" ReadInput" , warningstr);
133+ #endif
134+ if ( ks_solver == " cusolvermp" )
135+ {
136+ #ifndef __CUSOLVERMP
137+ warningstr = " ks_solver is set to cusolvermp, but ABACUS is not built with cusolvermp support\n "
138+ " Please rebuild ABACUS with cusolvermp support or change the ks_solver." ;
139+ ModuleBase::WARNING_QUIT (" ReadInput" , warningstr);
140+ #endif
141+ }
128142 }
129143 else if (ks_solver == " pexsi" )
130144 {
You can’t perform that action at this time.
0 commit comments