-
Notifications
You must be signed in to change notification settings - Fork 47
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
Wrap the MPI handles #677
Merged
Merged
Wrap the MPI handles #677
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
Improves the type safety within the code and prepares switching to the mpi_f08 module.
Can one of the admins verify this patch? |
for more information, see https://pre-commit.ci
@alazzaro Any objection? ( I think this PR is meant to be the starting point for more contributions. ) |
I'm sorry, I cannot really follow on that this week... Please go ahead and merge it. |
Thank you, Frederick four your contribution! |
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.
This PR wraps the MPI handles which used to be plain integers into their own derived types. The handle component is kept private to facilitate the transition to the new mpi_f08 bindings introducing their own types and allow to switch between serial/MPI 90 binding/MPI 2008 bindings. I implemented setters and getters and the comparison operators for convenience. Regarding the constants, the wrapper module will distinguish the handles (which are used for the default initializers) and the actual parameters exposed to the rest of the library. This refactoring improves the type safety within the library.
The new types are used only internally and are not meant to be exposed to users of DBCSR which is why some routines accessible via the dbcsr_api.F module need a wrapper routine to wrap the passed integer handles into the new types. Thus, the external APIs did not change.
Similar changes have already been applied to CP2K. I will continue this PR by adding support for the MPI 2008 bindings which should solve some issues with the old MPI 90 bindings.