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

Paul Osmialowski pawel.osmialowski at foss.arm.com
Fri Sep 28 01:42:10 EDT 2018


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
> 



More information about the flang-dev mailing list