Giter Site home page Giter Site logo

OpenMPI configure script wrongly recognizes which directive to use for ignoring tkr in case of the new LLVM Fortran compiler about ompi HOT 9 CLOSED

pawosm-arm avatar pawosm-arm commented on June 13, 2024
OpenMPI configure script wrongly recognizes which directive to use for ignoring tkr in case of the new LLVM Fortran compiler

from ompi.

Comments (9)

pawosm-arm avatar pawosm-arm commented on June 13, 2024 1

It works great,

checking Fortran compiler ignore TKR syntax... not cached; checking variants
checking for Fortran compiler support of TYPE(*), DIMENSION(*)... no
checking for Fortran compiler support of !GCC$ ATTRIBUTES NO_ARG_CHECK... no
checking for Fortran compiler support of !DIR$ IGNORE_TKR... yes
checking Fortran compiler ignore TKR syntax... 1:type(*):!DIR$ IGNORE_TKR
checking if Fortran compiler supports ISO_C_BINDING... yes
checking if building Fortran 'use mpi' bindings... yes

In the generated mpi-f08-interfaces.h file:

interface  MPI_Recv_init
subroutine MPI_Recv_init_f08(buf,count,datatype,source,tag,comm,request,ierror)
   use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request
   implicit none
   !DIR$ IGNORE_TKR buf
   type(*) OMPI_ASYNCHRONOUS :: buf
   INTEGER, INTENT(IN) :: count, source, tag
   TYPE(MPI_Datatype), INTENT(IN) :: datatype
   TYPE(MPI_Comm), INTENT(IN) :: comm
   TYPE(MPI_Request), INTENT(OUT) :: request
   INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Recv_init_f08
end interface  MPI_Recv_init

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! :)

from ompi.

jsquyres avatar jsquyres commented on June 13, 2024 1

FYI: This fix will be included in the next v5.0.x release.

from ompi.

pawosm-arm avatar pawosm-arm commented on June 13, 2024

Note that the CMake scripts may be affected similar way.

The top-level OpenMPI project doesn't use CMake.

from ompi.

ggouaillardet avatar ggouaillardet commented on June 13, 2024

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 ASYNCHRONOUS (accepted in interfaces but not subroutines (!))
the inline patch below helped me

Can you please confirm which LLVM version you are running and your Open MPI configure command line?

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)])

from ompi.

pawosm-arm avatar pawosm-arm commented on June 13, 2024

Thanks for your prompt response!

For my experiments, I'm using fairly recent LLVM built from the main branch:

$ mpifort --version
flang-new version 19.0.0git (https://github.com/llvm/llvm-project.git 3197146cc6ae1cefe0b21326f0509add3369decb)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir:
Build config: +unoptimized, +assertions

I guess the feature you've mentioned has been implemented by this commit:

commit f31ac3cb1ff7958fadf6e3e431790f2d668583b4
Author: Peter Klausler <[email protected]>
Date:   Fri Mar 1 14:43:31 2024 -0800

    [flang] Handle implied ASYNCHRONOUS attribute (#82638)

    The standard states that data objects involved in an asynchronous data
    transfer statement gain the ASYNCHRONOUS attribute implicitly in the
    surrounding subprogram or BLOCK scope. This attribute affects the checks
    in call semantics, as an ASYNCHRONOUS actual object associated with an
    ASYNCHRONOUS dummy argument must not require data copies in or out.

    (Most compilers don't implement implied ASYNCHRONOUS attributes
    correctly; XLF gets these right, and GNU is close.)

I've verified that the git log starting from the llvmorg-18.1.4 does NOT contain this commit.

from ompi.

ggouaillardet avatar ggouaillardet commented on June 13, 2024

thanks, that makes more sense to me now!

I will rebuild LLVM and try again.

from ompi.

pawosm-arm avatar pawosm-arm commented on June 13, 2024

I think I was too fast with my response. This commit refers to implied attribute, while your code explicitly name it.
If you still encounter the problem, can you paste the error message? I haven't seen it myself yet.

from ompi.

ggouaillardet avatar ggouaillardet commented on June 13, 2024

I issued #12512 to address the false positives and enable IGNORE_TKR with upcoming LLVM 19.

Can you please give it a try?

from ompi.

janjust avatar janjust commented on June 13, 2024

fixed with: #12512

from ompi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.