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()
122
122
}
123
123
else if (ks_solver == " cusolver" || ks_solver == " cusolvermp" )
124
124
{
125
+ std::string warningstr;
125
126
#ifndef __MPI
126
127
ModuleBase::WARNING_QUIT (" ReadInput" , " Cusolver can not be used for series version." );
127
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
+ 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
+ }
128
142
}
129
143
else if (ks_solver == " pexsi" )
130
144
{
You can’t perform that action at this time.
0 commit comments