-
Notifications
You must be signed in to change notification settings - Fork 864
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
Fortran: first try if type(*), dimension(..) works as-is #11591
base: main
Are you sure you want to change the base?
Fortran: first try if type(*), dimension(..) works as-is #11591
Conversation
Refs. #11582 |
:bot:ibm:retest |
34f6114
to
e9fe244
Compare
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.
Two comments:
-
you've removed the option to fall-back to TYPE(), DIMENSION() if TYPE(*), DIMENSION(..) doesn't work. I think we can check DIMENSION(..) first, but we should fall back to what we have previously, as I don't think it was ever wrong.
-
You've added ASYNCHRONOUS but only to the new option. It seems inconsistent, why not update it in all the options? In my mind CONTIGUOUS is probably more important, but perhaps that's a different PR.
e9fe244
to
5bc11e5
Compare
|
I re-scanned the mpi 4.0 standard here. Disregard my comment about contiguous, and I see your point about asynchronous. That is surprising to me that DIMENSION(..) is allowed but not with ASYNCHRONOUS. I wonder why. After thinking about it some more, I do have a concern that we are changing many interfaces to include ASYNCHRONOUS, when the standard only suggests the non-blocking routines include the keyword. My gut tells me this won't cause any compilation problems, but could potentially cause a performance regression as it ties the compilers hands during optimization somewhat. It would be good to ensure we don't introduce a regression with this change. Better yet, perhaps we should introduce a separate |
5bc11e5
to
1a3a7e4
Compare
|
Ah, I missed that. Thank you. |
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.
The code looks good to me. I'm not familiar enough with the IBM CI to comment on those errors.
Can someone explain why they are failing?
@jjhursey could you please (have someone) have a look at the CI issue on IBM platforms?
|
bot:ibm:retest |
bot:ibm:retest |
Replace old pragma declarations with the newr @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ syntax Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
First try if "type(*), dimension(..) :: foo" works as-is (e.g. without any pragma/directive). Thanks Chris Parrott for bringing this to our attention Refs. open-mpi#11582 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1a3a7e4
to
1ce3f29
Compare
@ggouaillardet This PR came up again in the last few days. I took the liberty of rebasing it to the tip of main (since it had some conflicts). Here's what my configure found, on a Mac M2 with gfortran 14 and Fedora 38 with gfortran 14:
And then Open MPI built and installed fine, and built all the example programs correctly. However, I notice that if I try to run
I ran out of time before being able to investigate further. It's a bit weird that it does a bunch of sends and receives seemingly correctly (i.e., the ring value decrements properly) and then hangs at the end. Any idea what's happening here? FYI @edgargabriel |
I think I see what is going on. in
so when the type for In the case of I moved the PR to draft from now, and I will try to think of a simple fix. |
Mm; right. I was thinking that the first thing in the descriptor was the pointer to the value, and therefore it would be transparent to OMPI's code (i.e., we would just de-reference, and would get the value, just like we did before descriptors). But I guess that's wrong: OMPI will need to double de-reference. Meaning: accepting |
That will be quite a change, but might not be that big via automation. I have a proof of concept in mind I will investigate from tomorrow. Also, that will be a first step towards supporting Fortran subarrays. |
I will have to revisit this issue with the latest Nvidia compilers. As long as the |
Currently, we (generally, it depends on the compiler) use the pragmas for both @jsquyres any thoughts? |
It's true that -- at least before Fortran compilers widely supported We have known that this was coming for a long time, but there's never been enough priority and resources to fix it, unfortunately. That being said, I'm pretty convinced that the way to fix it is to generate all 3 of the Fortran bindings (mpif.h, There have been multiple attempts at doing this over the past few years, but none were completed. The most recent attempt was out of Los Alamos. If memory serves, binding generation was a byproduct of embiggening / "big count". But that may still be the best path forward. True: we'll need to have some discussions about ABI. It might even be simplest to take a rip-the-band-aid-off type of solution -- just do a whole new |
Thanks @jsquyres. Could you please discuss this during the next call and provide some directions? |
A few points for ya -- feel free to ask for more data (I forget that your timezone is inconvenient to attend the OMPI engineering webexes, etc.):
|
@ggouaillardet Given that I don't think we'll be able to have a quick-fix for supporting |
it seems the root cause was a false positive, i will investigate how to harden the test. |
incorrect info here. Jake's big count fortran side will include the assumed rank changes - #12226. I think this PR can be closed. |
That's good news! Will it include all Fortran APIs, or just the ones with bigcount?
If there's a solution for the issue described in #11582 for v5.0.x (and potentially v4.1.x), this is worth keeping open. |
Believe it or not, that did the trick! I will make some more testing and issue a new PR this week diff --git a/config/ompi_fortran_check_ignore_tkr.m4 b/config/ompi_fortran_check_ignore_tkr.m4
index 3686bca82e..ac23f42b91 100644
--- a/config/ompi_fortran_check_ignore_tkr.m4
+++ b/config/ompi_fortran_check_ignore_tkr.m4
@@ -200,12 +200,12 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
end subroutine force_assumed_shape
module check_ignore_tkr
- interface
- subroutine foobar(buffer, count)
+ interface foobar
+ subroutine foobar_x(buffer, count)
$1 buffer
$2, intent(in) :: buffer
integer, intent(in) :: count
- end subroutine foobar
+ end subroutine foobar_x
end interface
end module
|
To give some info from flang-new using
This leads to the
I don't know if the intention is that Here are the outputs for the checks
|
Backporting the LLVM |
@bcornille This is the message I get with LLVM 18.1.8
But if I used I am not sure how to interpret your previous message. I think this PR will be dropped (wrong approach that would require way too many changes and break the ABI) in favor of #12681. As far as |
No description provided.