-
Notifications
You must be signed in to change notification settings - Fork 931
v4.0.x: fortran/use-mpi-f08: revamp mpi_f08 constants #7116
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
v4.0.x: fortran/use-mpi-f08: revamp mpi_f08 constants #7116
Conversation
6c35cdb to
e986f21
Compare
|
@jsquyres can you please review this? I incidentally noted some stuff is missing. For example |
|
Have you tested that this doesn't break ABI w.r.t. all the constants changing types? I can't think of a reason why |
|
@ggouaillardet I added |
|
Why do we want this in v4.0.x? Aside from the discussion about missing |
|
@hppritcha This is in reference to #7091 (i.e., bug fix for the ARM complier). |
|
@shamisp what's allinea's opinion of this flang problem? |
|
@ggouaillardet We talked about this yesterday on the RM call. Seems like it's two issues:
|
Refers open-mpi#5801 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> (cherry picked from commit open-mpi/ompi@69f1a19)
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com> (cherry picked from commit open-mpi/ompi@e0c5bad)
Though the MPI standard does not have `MPI_CXX_COMPLEX`, `mpi.h`, `mpif.h`, and `mpi.mod` have it. So I added it for consistency. Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com> (cherry picked from commit open-mpi/ompi@63ecf01)
In order to work around an issue with flang based compilers,
avoid declaring bind(C) constants and use plain Fortran parameter
instead.
For example,
type(MPI_Comm), bind(C, name="ompi_f08_mpi_comm_world") OMPI_PROTECTED :: MPI_COMM_WORLD
is changed to
type(MPI_Comm), parameter :: MPI_COMM_WORLD = MPI_Comm(OMPI_MPI_COMM_WORLD)
Note that in order to preserve ABI compatibility, ompi/mpi/fortran/use-mpi-f08/constants.{c,h}
have been kept even if its symbols are no more referenced by Open MPI.
Refs. open-mpi#7091
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
(back-ported from commit open-mpi/ompi@b10a60a)
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> (back-ported from commit open-mpi/ompi@df6d763)
- fix typos from open-mpi/ompi@b10a60a - remove remaining references to OMPI_PROTECTED from open-mpi/ompi@df6d763 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> (cherry picked from commit open-mpi/ompi@fda4d04)
e986f21 to
02c79ac
Compare
so yes, the plan is to move away from
|
|
I made some tests and found no ABI issues. |
|
Ok, good to know. The discussion on the Monday+Tuesday Webexes was that @shamisp Can someone from ARM please chime in here? |
|
I discussed flang vs f18 at SC, and I can confirm f18 is not quite yet ready to replace flang (f18 currently requires |
|
@hppritcha I'm ready to merge this to v4.0.x as @ggouaillardet has tested this for ABI compatibility issues, and found none. |
No description provided.