File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ void Driver::driver_run()
8787 {
8888 p_esolver->runner (ucell, 0 );
8989 }
90- else if (cal == " get_pchg" || cal == " get_wf" || cal == " gen_bessel" || cal == " gen_opt_abfs" ||
90+ else if (cal == " get_pchg" || cal == " get_wf" || cal == " gen_bessel" || cal == " gen_opt_abfs" ||
9191 cal == " test_memory" || cal == " test_neighbour" )
9292 {
9393 // ! supported "other" functions:
@@ -128,6 +128,11 @@ void Driver::init_hardware()
128128#endif
129129
130130#ifdef __DSP
131+ if (GlobalV::NPROC != KPAR)
132+ {
133+ std::cout << " Error: Number of processors must be equal to KPAR for DSP hardware initialization." << std::endl;
134+ std::exit (1 );
135+ }
131136 std::cout << " ** Initializing DSP Hardware..." << std::endl;
132137 mtfunc::dspInitHandle (GlobalV::MY_RANK % PARAM.inp .dsp_count );
133138#endif
@@ -149,4 +154,4 @@ void Driver::finalize_hardware()
149154 std::cout << " ** Closing DSP Hardware..." << std::endl;
150155 mtfunc::dspDestoryHandle (GlobalV::MY_RANK);
151156#endif
152- }
157+ }
You can’t perform that action at this time.
0 commit comments