[Flang-dev] Flang and MPICH works...

Jeff Hammond jeff.science at gmail.com
Fri Sep 28 11:23:23 EDT 2018


I recall that MPICH applies patches to Autotools to address such issues.  I
recommend you submit the necessary patches as pull requests to MPICH.  For
example, autogen.sh applies
maint/patches/optional/confdb/darwin-ifort.patch.

Jeff

On Fri, Sep 28, 2018 at 12:30 AM Nathan Sircombe <Nathan.Sircombe at arm.com>
wrote:

> Hi,
>
> Yep, this Autotools problem is frustratingly common - there are quite a
> few libraries and applications (
> https://gitlab.com/arm-hpc/packages/wikis/categories/allPackages) where
> the crude work around of manually fixing libtool post-configure is
> suggested:
>
>   sed -i -e 's#wl=""#wl="-Wl,"#g' libtool
>   sed -i -e 's#pic_flag=""#pic_flag=" -fPIC -DPIC"#g' libtool
>
> Clearly patching the upstream Autotools as Paul attempted would be great.
> But even then it would take some time for that change to filter down, a lot
> of packages would likely continue to ship with out-of-date autotools
> scripts for some time.
>
> The OpenMPI developers fixed their distribution, adding a patch to the end
> of their autogen script (this has been present from 3.1 onwards), being
> pragmatic, I would encourage developers of other libs and packages to do
> something similar, however inelegant that is... I've been in contact with
> the MVAPICH team about the same issue ahead of their next release - I
> believe the fixup for MPICH distribution would be essentially the same.
>
> The OpenMPI team also attempted an upstream patch (which one of Paul's
> links references), http://savannah.gnu.org/patch/?9442 - this has also
> gone nowhere!
>
> Cheers,
> Nathan.
>
>
>
>
>
> Nathan John Sircombe HPC | Arm
> . . . . . . . . . . . . . . . . . . . . . . . . . . .
> p: +44 161 509 1904
> arm.com <http://www.arm.com>
>
> On 28/09/2018, 06:43, "flang-dev on behalf of Paul Osmialowski" <
> flang-dev-bounces at lists.flang-compiler.org on behalf of
> pawel.osmialowski at foss.arm.com> wrote:
>
>     The whole problem (with libtool) that mpich and some other Fortran
>     utilizing projects face is caused by configure scripts they are shipped
>     with. Similarly, CMake also used to face Flang related problems, but
>     Kitware already addressed them and newer CMake versions recognize Flang
>     correctly.
>
>     There is a bunch of my patches from 2017 for autotools related GNU
>     projects (gnulib, libtool, automake, autoconf) that address libtool
>     issues in projects like openmpi, mpich, mvapich, netcdf-fortran, etc.:
>
>     Gnulib:
>     Patch:
> http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00191.html
>     Comment:
> http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00190.html
>
>     Libtool:
>     Patch:
>
> http://lists.gnu.org/archive/html/libtool-patches/2017-08/msg00002.html
>     Comment:
>
> http://lists.gnu.org/archive/html/libtool-patches/2017-08/msg00001.html
>     Some reaction:
>
> http://lists.gnu.org/archive/html/libtool-patches/2017-08/msg00000.html
>
>     Automake:
>     Patch:
>
> http://lists.gnu.org/archive/html/automake-patches/2017-08/msg00001.html
>     Comment:
>
> http://lists.gnu.org/archive/html/automake-patches/2017-08/msg00002.html
>     Some reaction:
>
> http://lists.gnu.org/archive/html/automake-patches/2017-08/msg00003.html
>
>     Autoconf:
>     Patch:
>
> http://lists.gnu.org/archive/html/autoconf-patches/2017-08/msg00013.html
>     (resend with proper e-mail address)
>     Patch:
>
> http://lists.gnu.org/archive/html/autoconf-patches/2017-08/msg00011.html
>     (original, sent accidentally with root@ e-mail address)
>     Comment:
>
> http://lists.gnu.org/archive/html/autoconf-patches/2017-08/msg00012.html
>     Some reaction:
>
> http://lists.gnu.org/archive/html/autoconf-patches/2017-08/msg00015.html
>
>     With autotools projects patched with them, one can re-generate
> configure
>     script (for mpich and alikes) so it should recognize Flang properly.
>
>     Unfortunately, those commits all refer non-GNU products and autotools
>     are of GNU world, so I don't expect acceptance of those before end of
>     this century.
>
>     Cheers,
>     Paul
>
>
>     On 09/27/18 22:52, Jeff Hammond wrote:
>     > I built Flang with
>     >
> https://github.com/jeffhammond/HPCInfo/blob/master/buildscripts/llvm-flang.sh
>     > on Ubuntu 16.04 and then compiled MPICH without error using this:
>     >
>     > ../configure CC=clang CXX=clang++ FC=/opt/llvm/pgi-flang/bin/flang
>     > F77=/opt/llvm/pgi-flang/bin/flang --enable-cxx --enable-fortran
>     > --with-pm=hydra --prefix=/opt/mpich/dev/clang/default
>     > --enable-wrapper-rpath --enable-static --disable-shared
>     >
>     > As reported in https://github.com/pmodels/mpich/issues/3334,
> something
>     > causes libtool to fail to generate shared objects when Fortran is
>     > enabled, so I just build twice, once without Fortran with shared
> enabled
>     > and once with Fortran with static enabled.
>     >
>     > This isn't a new issue
>     > (https://lists.mpich.org/pipermail/discuss/2017-December/005368.html
> )
>     > but I don't care enough about having a shared library for libmpifort
> to
>     > debug it.
>     >
>     > Jeff
>     >
>     > --
>     > Jeff Hammond
>     > jeff.science at gmail.com <mailto:jeff.science at gmail.com>
>     > http://jeffhammond.github.io/
>     >
>     >
>     > _______________________________________________
>     > flang-dev mailing list
>     > flang-dev at lists.flang-compiler.org
>     >
> http://lists.flang-compiler.org/mailman/listinfo/flang-dev_lists.flang-compiler.org
>     >
>
>     _______________________________________________
>     flang-dev mailing list
>     flang-dev at lists.flang-compiler.org
>
> http://lists.flang-compiler.org/mailman/listinfo/flang-dev_lists.flang-compiler.org
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
> _______________________________________________
> flang-dev mailing list
> flang-dev at lists.flang-compiler.org
>
> http://lists.flang-compiler.org/mailman/listinfo/flang-dev_lists.flang-compiler.org
>


-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20180928/a15e7f36/attachment-0001.html>


More information about the flang-dev mailing list