Allow use of default MPI Communicator with Fortran API#161
Merged
mo-mglover merged 7 commits intoMetOffice:mainfrom May 9, 2025
Merged
Allow use of default MPI Communicator with Fortran API#161mo-mglover merged 7 commits intoMetOffice:mainfrom
mo-mglover merged 7 commits intoMetOffice:mainfrom
Conversation
mo-mglover
reviewed
May 9, 2025
mo-mglover
reviewed
May 9, 2025
mo-mglover
requested changes
May 9, 2025
Collaborator
mo-mglover
left a comment
There was a problem hiding this comment.
Looks good to me. I agree that the optional argument approach is the right way to do this.
I've made a couple of inline comments.
[Noticed a few capitalisation issues, too, but I haven't nit-picked about those!]
Also noted, just for the papertrail, that there's a number of other bits of tidying up mixed in, such as a cmake function to facilitate adding new Fortran pfunit tests and removal of trailing whitespace.
Co-authored-by: Maff Glover <78152252+mo-mglover@users.noreply.github.com>
mo-mglover
approved these changes
May 9, 2025
This file contains hidden or 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
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.
Although Vernier will use a default MPI communicator when called from the C++ API this has not been passed through to the Fortran API. Have added the capability here.
I haven't been able to get the testing working using pFUnit, I'm not sure why, for some reason it hangs. I do know that pFUnit controls the MPI communicator and duplicates it, it does state in the source not to use MPI_COMM_WORLD outside the main pFUnit program MpiContext.F90#L65 so perhaps they are doing some thing that doesn't play well if we try to use MPI_COMM_WORLD for Vernier as well.
As it is I've created a simple system test to check the call without an argument works, we perhaps need a better mechanism for testing this at some point.
I've also done a bit of tidying up of all the test names.