-
Notifications
You must be signed in to change notification settings - Fork 900
OpenMPI configure script wrongly recognizes which directive to use for ignoring tkr in case of the new LLVM Fortran compiler #12506
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
Comments
The top-level OpenMPI project doesn't use CMake. |
Thanks for the report! I am able to reproduce it and will have a look. FWIW, with LLVM 18.1.4, I first faced an issue with Can you please confirm which diff --git a/config/ompi_fortran_check_asynchronous.m4 b/config/ompi_fortran_check_asynchronous.m4
index 0cc3c84bfe..061511730b 100644
--- a/config/ompi_fortran_check_asynchronous.m4
+++ b/config/ompi_fortran_check_asynchronous.m4
@@ -35,6 +35,10 @@ SUBROUTINE binky(buf)
REAL, DIMENSION(*), ASYNCHRONOUS :: buf
END SUBROUTINE
END INTERFACE
+CONTAINS
+SUBROUTINE wookie(buf)
+ REAL, DIMENSION(*), ASYNCHRONOUS :: buf
+END SUBROUTINE
END MODULE asynch_mod]])],
[AS_VAR_SET(asynchronous_var, yes)],
[AS_VAR_SET(asynchronous_var, no)]) |
Thanks for your prompt response! For my experiments, I'm using fairly recent
I guess the feature you've mentioned has been implemented by this commit:
I've verified that the git log starting from the |
thanks, that makes more sense to me now! I will rebuild LLVM and try again. |
I think I was too fast with my response. This commit refers to implied attribute, while your code explicitly name it. |
as reported in open-mpi#12506, upcoming LLVM 19 can generate some false positive that will make the mpi Fortran modules unusable. Harden the test by using a module in order to fix that. Thanks Paul Osmialowski for bringing this to our attention. Signed-off-by: Gilles Gouaillardet <[email protected]>
I issued #12512 to address the false positives and enable Can you please give it a try? |
as reported in open-mpi#12506, upcoming LLVM 19 can generate some false positive that will make the mpi Fortran modules unusable. Harden the test by using a module in order to fix that. Thanks Paul Osmialowski for bringing this to our attention. Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 8c601e1)
fixed with: #12512 |
It works great,
In the generated
It took me a while, but I'd also needed to verify it works with spack and finally, I've managed to build all the workload I needed! Thanks for quick solving this problem! :) |
FYI: This fix will be included in the next v5.0.x release. |
as reported in open-mpi#12506, upcoming LLVM 19 can generate some false positive that will make the mpi Fortran modules unusable. Harden the test by using a module in order to fix that. Thanks Paul Osmialowski for bringing this to our attention. Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 8c601e1)
as reported in open-mpi#12506, upcoming LLVM 19 can generate some false positive that will make the mpi Fortran modules unusable. Harden the test by using a module in order to fix that. Thanks Paul Osmialowski for bringing this to our attention. Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 8c601e1)
as reported in open-mpi#12506, upcoming LLVM 19 can generate some false positive that will make the mpi Fortran modules unusable. Harden the test by using a module in order to fix that. Thanks Paul Osmialowski for bringing this to our attention. Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 8c601e1)
Background information
OpenMPI configure script wrongly recognizes which directive to use for ignoring tkr in case of the new LLVM Fortran compiler. This is due to the lack of the knowledge about such compiler in the https://github.com/open-mpi/ompi/blob/main/config/ompi_fortran_check_ignore_tkr.m4 script.
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
git, main branch
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
from a git clone
If you are building/installing from a git clone, please copy-n-paste the output from
git submodule status
.Please describe the system on which you are running
Details of the problem
Consider simple program (extracted from some real HPC workload):
This used to compile with any of the Fortran compilers at my disposal with OpenMPI 4.1.6. Unfortunately, this does not compile with the latest development of the OpenMPI, due to the change in the way the Fortran modules are being prepared. It now throws this error:
Element of assumed-shape array may not be associated with a dummy argument 'buf=' array
.Previously, it was the
ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.F90
file which defined theMPI_Recv_init
interface as such:Now this file does not define that interface anymore, currently that interface is generated by the
configure
script from the following template held in thempi-f08-interfaces.h.in
file:The
IGNORE_TKR
part is handled by the following lines of theconfig/ompi_fortran_check_ignore_tkr.m4
script:Sadly, this script is prone to fall into a false positive and the
configure
script output looks like this:The new LLVM Fortran compiler does not support any of the
!GCC$
directives, but also does not fail to compile the programs containing it. Whatever check is being done here is insufficient. But the real problem is that none of the other alternatives fits perfectly. The closest isCray
, but it specifies a wrong type forOMPI_FORTRAN_IGNORE_TKR_TYPE
.The easiest solution I could recommend is to add a check for LLVM Fortran compiler and place it BEFORE the
GCC compilers
, e.g.:After re-generating the
configure
script withautogen.pl
, it generates the interface that does not prevent the compilation of the example Fortran program.The text was updated successfully, but these errors were encountered: