File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,19 @@ 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." );
128+ #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+ #ifndef __CUSOLVERMP
135+ warningstr = " ks_solver is set to cusolvermp, but ABACUS is not built with cusolvermp support\n "
136+ " Please rebuild ABACUS with cusolvermp support or change the ks_solver." ;
137+ ModuleBase::WARNING_QUIT (" ReadInput" , warningstr);
127138#endif
128139 }
129140 else if (ks_solver == " pexsi" )
You can’t perform that action at this time.
0 commit comments