Commit 9bb8e1c1 authored by Martin Reinecke's avatar Martin Reinecke

fix for crash if nthreads was larger than available hardware threads

parent a2662869
......@@ -1372,7 +1372,7 @@ template<typename Serv> class WgridHelper
if (verbosity>0) cout << "nplanes: " << nplanes << endl;
vector<size_t> tcnt(my_max_threads()*nplanes,0);
vector<size_t> tcnt(max<int>(nthreads, my_max_threads())*nplanes,0);
#pragma omp parallel num_threads(nthreads)
vector<size_t> mytcnt(nplanes,0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment