-
Notifications
You must be signed in to change notification settings - Fork 928
mpi-ext.h: include <mpi.h> #12122
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
base: main
Are you sure you want to change the base?
mpi-ext.h: include <mpi.h> #12122
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.
LGTM
|
I understand the argument of self-sufficiency, it makes sense in general but not here. These are extensions, they shall not exists without the rest of MPI, so hiding the |
|
@bosilca You are saying that this: #include <mpi.h>
#include <mpi-ext.h> works but this: #include <mpi-ext.h> // fails today because some symbols from mpi.h are not available yet
#include <mpi.h>must not work because dependencies are not yet fulfilled? This should at least be properly documented as that is utterly confusing and goes against most people's intuition (a precompiler warning would be helpful then). |
|
Ideally I would like to be able to support both, but that is not possible without splitting mpi.h, a lot of efforts for mostly nothing. Thus we have 3 choices:
|
|
@bosilca Can you expound on your statement "This will bring OMPI in sync with other MPI"? I.e., are you saying that MPICH has their own extensions in their I know that the original design intent for Open MPI's #include <mpi.h>
#if defined(OPEN_MPI) and OPEN_MPI
#include <mpi-ext.h>
#endif
void foo(void)
{
#if defined(OPEN_MPI) and OPEN_MPI
MPIX_Some_open_mpi_specific_API(...);
#endif
}I think @bosilca enumerated the options clearly; we could choose to do something different than we have in the past, if we want to. If we stay the course, however, (i.e., keep our extensions in a must-be-included-separately // At the top of mpi-ext.h
#if !defined(OPEN_MPI) or !OPEN_MPI
#error You must include Open MPI's <mpi.h> before including <mpi-ext.h>
#endif |
|
Yes, mpich's |
|
Taking in account the very limited number of extensions we provide it would make sense to use the same approach as MPICH and include the extensions in our |
|
wrong button, I really didn't mean to close it. |
Ensure to #include <mpi.h> at the top of mpi-ext.h, just so that it includes files that it depends on. Thanks to Erik Schnetter for raising the issue. Signed-off-by: Jeff Squyres <[email protected]>
25f1656 to
06b77d4
Compare
|
Re-noticed / remembered this still-open PR in Oct 2024. Rebased / freshened up this PR to current tip of |
Ensure to #include <mpi.h> at the top of mpi-ext.h, just so that it includes files that it depends on.
Thanks to @eschnett for raising the issue.
Refs #12111