-
Notifications
You must be signed in to change notification settings - Fork 328
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
Use MPI Fortran module in ElmerSolver if possible. #549
Conversation
Define preprocessor macros that indicate if MPI Fortran modules are available with the detected MPI implementation. If available prefer the Fortran over the Fortran header. That improves compiler diagnositics and reduces the number of compiler warnings about supposed type mismatches.
Fix errors that were identified by building with the MPI module.
This change greatly reduces the number of (bogus) warnings from the Fortran compiler. That makes it more tangible to sift through the remaining compiler warnings and check for useful ones. It shouldn't have any effect on functionality. Could the changes from this PR be applied? |
This is ok, although maybe there would be some module which would cover
most (all?) mpi usage such that the "use mpi" could be inserted to fewer (one?)
localtion(s) ? But also fine asis by me!
From: "Markus Mützel" ***@***.***>
To: "ElmerCSC" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Monday, 2 September, 2024 21:10:45
Subject: Re: [ElmerCSC/elmerfem] Use MPI Fortran module in ElmerSolver if possible. (PR #549)
This change greatly reduces the number of (bogus) warnings from the Fortran compiler. That makes it more tangible to sift through the remaining compiler warnings and check for useful ones.
It shouldn't have any effect on functionality.
Could the changes from this PR be applied?
—
Reply to this email directly, [ #549 (comment) | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ACTOMSU3WKM2UQVJLDHRNB3ZUSS2LAVCNFSM6AAAAABNLD4V42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGE3DONRSGY | unsubscribe ] .
You are receiving this because you are subscribed to this thread. Message ID: ***@***.***>
|
Due to this (?) commit my cmake (3.17.5) fails with this: CMake Error at CMakeLists.txt:217 (ADD_LIBRARY): CMake Error at CMakeLists.txt:218 (ADD_LIBRARY): CMake Error at CMakeLists.txt:219 (ADD_LIBRARY): any idea ? |
Oof. Which version of CMake do you use? I've been testing with a pretty new version:
An alternative to using ALIAS targets could be to create our own imported targets and link to the respective MPI:: targets instead. In any case: Sorry for the inconvenience. |
This fixes a configuration issue with older versions of CMake. See: ElmerCSC#549 (comment) ``` CMake Error at CMakeLists.txt:217 (ADD_LIBRARY): ADD_LIBRARY cannot create ALIAS target "Elmer::MPI_Fortran" because target "MPI::MPI_Fortran" is imported but not globally visible. CMake Error at CMakeLists.txt:218 (ADD_LIBRARY): ADD_LIBRARY cannot create ALIAS target "Elmer::MPI_C" because target "MPI::MPI_C" is imported but not globally visible. CMake Error at CMakeLists.txt:219 (ADD_LIBRARY): ADD_LIBRARY cannot create ALIAS target "Elmer::MPI_CXX" because target "MPI::MPI_CXX" is imported but not globally visible. ```
Define preprocessor macros that indicate if MPI Fortran modules are available with the detected MPI implementation.
If available prefer the Fortran module over the Fortran header. That improves compiler diagnostics and reduces the number of compiler warnings about supposedly mismatched types.
Also, fix errors that were identified by building with the MPI module.
If this change is acceptable something similar could probably also be done for ElmerIce (or parpack).