-
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
NAG 7.2 does not build 5.0.2, but does 4.1.6: -pthread passed to ld #12413
Comments
Oh, and I can say I've built Open MPI 5.0.2 with NAG 7.2 (and Apple Clang) on my macOS laptop, so I don't think is nagfor per se. Maybe something Clang is happy with but GCC isn't? 🤷🏼 |
|
@bosilca Well, on my mac, I build Open MPI for NAG with clang as the C compiler, not GCC:
But, on the RHEL 8 machine I see:
Of course, the error seems to say
The verbose make says:
It's like configure has decided to pass |
When In your case, I do not quite see the connection between these ... |
since you built
|
@ggouaillardet Here is the make output for Open MPI 4.1.6:
and here is the same for 5.0.2:
Doing a compare I see for 4.1.6:
and for 5.0.2:
So a new |
Thanks @mathomp4 would you mind giving a try with this I regenerated a |
@ggouaillardet Well, I'm not sure if it's a good thing or bad thing, but I tried your tarball and it built fine with NAG 7.2.01 on the same system. |
I concur, thanks for the test! |
I think I am on to something, but I do not quite see a good fix for that... First the issue can be reproduced by
with
but from
the major difference is
@jsquyres @bwbarrett any ideas on how to best move forward? |
This might be the first ever NAG bug I've had that doesn't require purchasing NAG! 😄 Thanks for working on this, @ggouaillardet |
@mathomp4 can you please give this commit a try? you will need to apply it on a Or you might simply download this already bootstrapped tarball at https://github.com/ggouaillardet/ompi/releases/download/nag_pmix/openmpi-gitclone.tar.bz2 and simply run |
@ggouaillardet I grabbed the tarball but:
Should I try the source-and-autogen instead? |
I am puzzled since I could pass this with my could you please |
Here is what I see:
|
can you please
|
@ggouaillardet If I run those three steps, all is well. But if, from my build dir I do:
I get the fail:
So it's like |
Thanks. I expected the three steps to go well, but I wanted to see how profile/libmpi_mpifh_psizeof.la was built, so can you please share the output? |
Ahhh. My apologies. Here you go: ETA: This is just complex enough I didn't want to paste. 😄 |
Thanks, unfortunately I could not find anything relevant here ... Instead of going back and forth, can you upload a tarball of your build directory? If too big, you can simply include all the |
@ggouaillardet Here you go. This is my build dir but where I did |
Thanks again! So I finally found the issue. I uploaded a new tarball (same location) https://github.com/ggouaillardet/ompi/releases/download/nag_pmix/openmpi-gitclone.tar.bz2 could you please give it a try? |
@ggouaillardet I grabbed that tarfile and it configures, it builds, it installs, it checks, and Hello World says "Hello World".1 I think all is good! Footnotes
|
Fortran libraries do not need to be linked with PMIx, hwloc nor libevent. That can cause some issues with incompatible flags are pulled from the .la files. For example, when the NAG Fortran compiler is used, libmpi_mpifh_sizeof.la pulls the -pthread flag, that is translated into -Wl,-pthread. Then when libmpi_mpifh.la is linked with gcc but pulls -Wl,-pthread that causes the build to fail since -pthread is not a valid ld option. Not depending on these libraries is enough to avoid the above issue. Refs open-mpi#12413 Thanks to Matthew Thompson for reporting this issue and helping with the diagnostic. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Fortran libraries do not need to be linked with PMIx, hwloc nor libevent. That can cause some issues with incompatible flags are pulled from the .la files. For example, when the NAG Fortran compiler is used, libmpi_mpifh_sizeof.la pulls the -pthread flag, that is translated into -Wl,-pthread. Then when libmpi_mpifh.la is linked with gcc but pulls -Wl,-pthread that causes the build to fail since -pthread is not a valid ld option. Not depending on these libraries is enough to avoid the above issue. Refs open-mpi#12413 Thanks to Matthew Thompson for reporting this issue and helping with the diagnostic. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Background information
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
I'm testing Open MPI 5.0.2 (and 4.1.6)
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Both installed from tarfile.
Configure command is:
where
X.Y.Z
is either 4.1.6 or 5.0.2Please describe the system on which you are running
Details of the problem
I am trying to build Open MPI 5.0.2 with NAG Fortran 7.2.01 (with GCC 12.1 as C/C++) and all works until:
if I build with
V=1
:So, I thought, let me try Open MPI 4.1.6 and:
It builds successfully.
I looked around here and I did see #4032 which is old, but, well, NAG is there, pthread is there... Maybe some old fix for NAG and Open MPI 2 got into 3, stayed around for 4, but got lost with 5?
NOTE: I was going to try and maybe see if I could use our new NAG setup to help with #9795, but that is a configure time fail so...
The text was updated successfully, but these errors were encountered: