[Flang-dev] Flang and MPICH works...
Nathan.Sircombe at arm.com
Fri Sep 28 03:29:42 EDT 2018
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!
Nathan John Sircombe HPC | Arm
. . . . . . . . . . . . . . . . . . . . . . . . . . .
p: +44 161 509 1904
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
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.:
(resend with proper e-mail address)
(original, sent accidentally with root@ e-mail address)
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
On 09/27/18 22:52, Jeff Hammond wrote:
> I built Flang with
> 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
> but I don't care enough about having a shared library for libmpifort to
> debug it.
> Jeff Hammond
> jeff.science at gmail.com <mailto:jeff.science at gmail.com>
> flang-dev mailing list
> flang-dev at lists.flang-compiler.org
flang-dev mailing list
flang-dev at 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.
More information about the flang-dev