-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPI fixes #243
Merged
Merged
MPI fixes #243
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rather than reducing it on the fly everywhere
npartoftype is still required
MPI_TYPE_STRUCT was deprecated since MPI 2.0 and replaced with MPI_TYPE_CREATE_STRUCT It has exactly the same interface and does exactly the same thing And then MPI_TYPE_STRUCT was removed from the standard in MPI 3.0 But MPI_TYPE_STRUCT still works, but gives the incorrect result
and only print on master
npart is the number of particles on the local task ntot is the total number of particles
This was referenced Feb 21, 2022
maximum memory allocated is 4x the uniform share, make change on hdf5 version as well
don't do ptmass reductions unless necessary
after setting particle types
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR:
Bug fix, modifications to existing code
Description:
This PR includes several bugfixes. 3 fixes have been bundled from other PRs to reduce the testing load once the phantom benchmarks suite has been fixed.
#239:
Bug introduced in #96 , particles are assigned new IDs if a file without ID is read. IDs are erroneously duplicated across MPI tasks. This is fixed by using an offset to ensure all IDs are unique.
#240:
npartoftypetopt=reduceall_mpi('+',npartoftype)
is used in many places in the code, but it is always calculated on the fly. It only needs to be calculated after the number of any particle type on a task has changed. This PR stores it as a global variable inpart
, and defines a subroutine to recalculate it fromnpartoftype
.#241:
The summary variables
wake
,floor
, andtolv
were not reduced across MPI tasks, resulting in incorrect printout. This did not seem to have any effect on the actual results.Other small bugfixes:
MPI_TYPE_STRUCT
withMPI_TYPE_CREATE_STRUCT
:MPI_TYPE_STRUCT
was deprecated since MPI 2.0 and replaced withMPI_TYPE_CREATE_STRUCT
. It has exactly the same interface and does exactly the same thing. And thenMPI_TYPE_STRUCT
was removed from the standard in MPI 3.0 ButMPI_TYPE_STRUCT
still works, but gives the incorrect resultdtextforce
across mpi tasks, and only print to log from the master taskdtype_old
)initial
ntot
instead ofnpart
fornskip
, sincenpart
is only the local particle countntot
instead ofnpart
to print dtlognp
in timestep routinesTesting:
Full test suite
Did you run the bots? yes, pre-commit