Commit f38c0eaa authored by Stefan Ziehe's avatar Stefan Ziehe
Browse files

Fixed distributed blocking

parent 3d6979b7
......@@ -2002,6 +2002,8 @@ class Ptychography(Problem):
Nx = self.config['Nx'];
Ny = self.config['Ny'];
nx = self.config['nx'];
ny = self.config['ny'];
N_pie = self.config['N_pie'];
rangeNy = numpy.arange(Ny);
......@@ -2048,8 +2050,8 @@ class Ptychography(Problem):
placed[p] = True;
elif blocking_scheme == 'distribute':
in_block = numpy.arange(N_pie) % cols;
for i in range(Nx):
in_block[i*Nx:(i+1)*Nx] += (i % rows) * cols;
for i in range(nx):
in_block[i*nx:(i+1)*nx] += (i % rows) * cols;
elif blocking_scheme == 'split':
in_block = numpy.arange(N_pie) // (N_pie//(rows*cols));
else:
......
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