Commit f1540b9c authored by Martin Reinecke's avatar Martin Reinecke
Browse files

tentative fix

parent e5902284
...@@ -894,16 +894,17 @@ template<typename T, typename T2=complex<T>> class Helper ...@@ -894,16 +894,17 @@ template<typename T, typename T2=complex<T>> class Helper
int idxu = (bu0+nu)%nu; int idxu = (bu0+nu)%nu;
int idxv0 = (bv0+nv)%nv; int idxv0 = (bv0+nv)%nv;
#pragma omp critical(gridder_writing_to_grid)
for (int iu=0; iu<su; ++iu) for (int iu=0; iu<su; ++iu)
{ {
int idxv = idxv0; int idxv = idxv0;
locks[idxu].lock(); // locks[idxu].lock();
for (int iv=0; iv<sv; ++iv) for (int iv=0; iv<sv; ++iv)
{ {
grid_w[idxu*nv + idxv] += wbuf[iu*sv + iv]; grid_w[idxu*nv + idxv] += wbuf[iu*sv + iv];
if (++idxv>=nv) idxv=0; if (++idxv>=nv) idxv=0;
} }
locks[idxu].unlock(); // locks[idxu].unlock();
if (++idxu>=nu) idxu=0; if (++idxu>=nu) idxu=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