WIP: New type for foreign gpart and gpart communications
Somewhat of an extension to and revival of #598.
The idea here is to solve two things in one go: Reduce the foreign memory usage of the gpart
and reduce the amount of data movement.
Given that foreign gpart
only act as source of gravity, we only need their mass and positions. This adds a separate type the gpart_foreign
to contain just that information. Cells then have a pointer to either a gpart
array or a gpart_foreign
array. The gravity code only needs a minor change since we were already
building thread-local caches from the particles before launching into the interactions themselves.
This leads to massive savings of memory.
The other possible benefit is that it reduces the amount of data we send. Here I have used MPI_Type_indexed
to select the subset of fields that need shipping. I don't know whether this is implemented in an efficient way. Maybe it reduces some of our memory copy speed issues.
At this stage I am looking for ideas and suggestions mainly.
@rttw52 how does that look for big runs?
Todo:
-
Deal with the FOF-related gpart
communication. -
Apply the same change to the other gravity scheme. -
Automate the construction of the foreign type via a macro? -
When running with debugging checks, add the checking fields to the foreign gpart
?
Merge request reports
Activity
added MPI memory usage performance labels
@nnrw56 thoughts from your side also welcome.
added 28 commits
-
c2ab5604...9900a5c0 - 18 commits from branch
master
- 361bc444 - Make sure the gravity cache write back only happens in local cells
- 416fc598 - Make sure the cache construction happens only locally
- 05dd14af - Define a simpler structure for the foreign gpart
- 2866552c - Create special MPI types to send and receive gpart
- 425b6121 - Working version of the MPI_indexed_type communications
- 5eac81dc - Add function to check inihibited status of foreign gpart
- d809c33c - Fix the debugging checks in the gravity loops using foreign particles
- 19e72958 - Update the runner_recv_gpart() task to use the new type
- c111163a - Cleaner version of the MPI gpart type creation
- 98fd144d - Also implement the no-cache flavour of the gravity interactions for the case of foreign neighbours
Toggle commit list-
c2ab5604...9900a5c0 - 18 commits from branch
added 1 commit
- 0b3841a7 - Create the same new type and corresponding function for the multi-softening case
added 1 commit
- 9350016a - When compiling when debugging checks switched on, also send the gpart's...
added 1 commit
- 1c4207e4 - Add the new file defining the MPI tools to create packed particles
added 1 commit
- 93068bc0 - Also create a smaller type for the transmission of the time-bin in the...
mentioned in merge request !1385 (merged)
added 208 commits
-
93068bc0...e9f8fb70 - 189 commits from branch
master
- ec8156d0 - Make sure the gravity cache write back only happens in local cells
- ae3ed407 - Make sure the cache construction happens only locally
- 2f461f6d - Define a simpler structure for the foreign gpart
- bcbc3c38 - Create special MPI types to send and receive gpart
- 1c116bce - Working version of the MPI_indexed_type communications
- e574886f - Add function to check inihibited status of foreign gpart
- 44b83001 - Fix the debugging checks in the gravity loops using foreign particles
- 3337e5f1 - Update the runner_recv_gpart() task to use the new type
- 3008ed81 - Cleaner version of the MPI gpart type creation
- b3e6f844 - Also implement the no-cache flavour of the gravity interactions for the case of foreign neighbours
- ee8a04d9 - Create the same new type and corresponding function for the multi-softening case
- cfcc775f - Use a macro to create the new indexed MPI types for communication of gparts
- a5ac9de8 - Create the MPI communication types for gpart via the newly designed macro
- 8e52019e - When compiling when debugging checks switched on, also send the gpart's...
- 238a4182 - Add the new file defining the MPI tools to create packed particles
- ded5e09a - Fix pointer mistake in the new macro
- aecb859d - Document the new macro
- a9918a22 - Also create a smaller type for the transmission of the time-bin in the...
- 8188d4db - Applied formatting script
Toggle commit list-
93068bc0...e9f8fb70 - 189 commits from branch
Superseded by something built on top of !1385 (merged).