-
Notifications
You must be signed in to change notification settings - Fork 131
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: use mpi module instead of Fortran include statement #389
MPI: use mpi module instead of Fortran include statement #389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this on izumi and it seems to work fine. I am sort of curious about the changes in the MPI calls (MPI_Send and MPI_Abort), why they worked before, and why they work with the updated arguments. Are there multiple supported versions of the interfaces in the implementation even though that does not seem to be documented?
The reason why it compiled correctly before is because the old way for CICE to have MPI functionality ( So I think all along we were not correctly using these subroutines. Since they are now defined in a module, the compiler automatically generates an interface and can thus check that they are called correctly. Citing the latest MPI specification (emphasis added):
The reason it ran correctly before... that's murkier. It's kind of above my technical knowledge, but I can speculate:
|
Also, the |
@phil-blain, thanks for the clarifications/speculation. That makes sense to me. It's surprising to me that there was never a problem before. These have probably been implemented incorrectly for a decade or more! |
PR checklist
Switch to
mpi
Fortran module instead of Fortraninclude
statementP Blain.
I did checked that it compiles correctly, was not sure if full-blown tests were necessary.
This is a first step towards #363. I tried to use the
mpi_f08
module but this required more extensive changes to the code, so I chose to do it incrementally by first switching to thempi
module.I had done this a while ago bu had not submitted it yet.