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
Setting CXX/CC confuses CMake MPI detection #11478
Comments
#5510 (comment) and https://gitlab.kitware.com/cmake/cmake/-/issues/17538 are related. |
Fascinating. Thanks for digging this up. Something else must be going wrong with ld-gold here. |
Well, I am running into #2820 so I can not use the gold linker when I don't specify the compiler wrappers (Ubuntu 16.04 and 20.04 do the same thing). Sigh. |
A suggestion for anyone running Ubuntu (and for myself in the future) unless we change anything in the deal.II MPI detection:
|
I have one additional observation: Without setting Does this mean that I have to do something like:
Am I right? This is the first time I am seeing this. I don't think we document this or do we? |
@tjhei I will try to reproduce again tomorrow - sorry that I was a bit slow on this one. |
So my conclusion is that the current situation makes OpenMPI unusable on Ubuntu 16.04/18.04/20.04 for me because I can either: :-( |
It would be great to figure this out before the release, as Ubuntu+OpenMPI is a common setup. |
I don't think I can help here. Are there realistic chances that we find a solution in the next two weeks? |
I think this is a major issue, but I have no idea how to proceed and I am hoping @tamiko finds some time before the release. |
Let me have a look before the release. But maybe we can work around that. |
Ah, shoot - I promised this one. Let us update the milesonte to 10.0 and if I have a solution in the next 7 days that is not too scary we can cherry-pick. |
@tjhei I was able to reproduce this. The issue is an apparent underlinkage with openmpi on Ubuntu (and Debian) systems where apparently I will try to come up with a heuristic to (somehow robustly) detect this. |
@tjhei For a quick confirmation: If you apply the following patch:
does a |
Clang has the same issue for me. |
@tjhei The above patch on Ubuntu 20.04.2 resolves the underlinkage issue for me and |
fixes it with clang and gcc! |
To conclude: The following issue remains: b) c) So, setting |
@tjhei I am afraid that there is not much we can do here except opening an upstream bug report with CMake. We rely on the
For me, the most reliable way of setting the desired MPI library is as follows (tested on Debian-11):
|
I will close this issue for now. |
Setting CC and CXX to mpicxx or mpicc confuses our MPI detection. While the library compiles correctly, include directories are not picked up in downstream projects leading to weird parsing errors inside IDEs.
Here is the test:
Here is the result:
and
Finally, ld=gold is also affected:
Any help here is appreciated. @tamiko can you reproduce this?
The text was updated successfully, but these errors were encountered: