Skip to content

Commit

Permalink
test out exchanging particles if for large Rmax
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhand committed Nov 21, 2017
1 parent 8852c76 commit 906486f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions nbodykit/algorithms/pair_counters/domain.py
Expand Up @@ -118,13 +118,13 @@ def decompose_box_data(first, second, attrs, logger, smoothing):
w1 = layout.exchange(w1)

# exchange second particles
if smoothing > attrs['BoxSize'].max() * 0.25:
pos2 = numpy.concatenate(comm.allgather(pos2), axis=0)
w2 = numpy.concatenate(comm.allgather(w2), axis=0)
else:
layout = domain.decompose(pos2, smoothing=smoothing)
pos2 = layout.exchange(pos2)
w2 = layout.exchange(w2)
# if smoothing > attrs['BoxSize'].max() * 0.25:
# pos2 = numpy.concatenate(comm.allgather(pos2), axis=0)
# w2 = numpy.concatenate(comm.allgather(w2), axis=0)
# else:
layout = domain.decompose(pos2, smoothing=smoothing)
pos2 = layout.exchange(pos2)
w2 = layout.exchange(w2)

# log the decomposition breakdown
log_decomposition(comm, logger, N1, N2, pos1, pos2)
Expand Down Expand Up @@ -258,13 +258,13 @@ def decompose_survey_data(first, second, attrs, logger, smoothing, domain_factor
w1 = layout.exchange(w1)

# get the position/weight of the secondaries
if smoothing > boxsize.max() * 0.25:
pos2 = numpy.concatenate(comm.allgather(pos2), axis=0)
w2 = numpy.concatenate(comm.allgather(w2), axis=0)
else:
layout = domain.decompose(cpos2, smoothing=smoothing)
pos2 = layout.exchange(pos2)
w2 = layout.exchange(w2)
# if smoothing > boxsize.max() * 0.25:
# pos2 = numpy.concatenate(comm.allgather(pos2), axis=0)
# w2 = numpy.concatenate(comm.allgather(w2), axis=0)
# else:
layout = domain.decompose(cpos2, smoothing=smoothing)
pos2 = layout.exchange(pos2)
w2 = layout.exchange(w2)

# log the decomposition breakdown
log_decomposition(comm, logger, N1, N2, pos1, pos2)
Expand Down

0 comments on commit 906486f

Please sign in to comment.