Skip to content
Snippets Groups Projects

Redistribute gparts

Merged Matthieu Schaller requested to merge redistribute_gparts into master

Initial version of engine_redistribute() which sends around the gparts as well as the parts + preserves their links.

@nnrw56 what do you think ? I'll need to update some bits later to take into account your changes to the MPI_types and the new version of space_part_sort()

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
213 int current_dest = dest[0];
214 size_t count_this_dest = 0;
215 for (size_t k = 0; k < s->nr_parts; ++k) {
216 if (s->parts[k].gpart != NULL) {
217
218 /* As the addresses will be invalidated by the communications, we will */
219 /* instead store the absolute index from the start of the sub-array */
220 /* of particles to be sent to a given node. */
221 /* Recall that gparts without partners have a negative id. */
222 /* We will restore the pointers on the receiving node later on. */
223 if (dest[k] != current_dest) {
224 current_dest = dest[k];
225 count_this_dest = 0;
226 }
227
228 s->parts[k].gpart->id = count_this_dest;
  • I may be missing something here, but where is count_this_dest incremented? Should there be an else clause doing so in the above if-statement?

  • Added 1 commit:

  • 213 int current_dest = dest[0];
    214 size_t count_this_dest = 0;
    215 for (size_t k = 0; k < s->nr_parts; ++k) {
    216 if (s->parts[k].gpart != NULL) {
    217
    218 /* As the addresses will be invalidated by the communications, we will */
    219 /* instead store the absolute index from the start of the sub-array */
    220 /* of particles to be sent to a given node. */
    221 /* Recall that gparts without partners have a negative id. */
    222 /* We will restore the pointers on the receiving node later on. */
    223 if (dest[k] != current_dest) {
    224 current_dest = dest[k];
    225 count_this_dest = 0;
    226 }
    227
    228 s->parts[k].gpart->id = count_this_dest;
  • You can re-assign to Peter when happy with the concept.

  • LGTM, all yours @pdraper!

  • Reassigned to @pdraper

  • Looks good to me, passes simple tests so accepting.

  • Peter W. Draper Status changed to merged

    Status changed to merged

  • Peter W. Draper mentioned in commit 95b97ce3

    mentioned in commit 95b97ce3

  • mentioned in issue #130 (closed)

  • Please register or sign in to reply
    Loading