Re: [mpich-discuss] [EXTERNAL] Re: Help building MPICH as shared library with NAG Fortran and Clang
Hui, Yeah. That is my current thought. Now, I do have libtool installed via Brew and maybe that's the issue, but try as I may by moving around that file/symlink, I can't seem to avoid this...or maybe autotools is just *really* good at finding it no matter what I do?[1] I had hoped maybe the Spack folks had a workaround, but the only nag+mpich patches they have: https://github.com/spack/spack/tree/develop/var/spack/repos/builtin/packages... seem to either be in mpich 4.0rc3 or not related to this! Matt [1] I thought about `brew uninstall libtool` but that uninstalls a *lot* of other packages. And a brew-less environment sort of breaks my fancy terminal environment! :) -- Matt Thompson, SSAI, Ld Scientific Programmer/Analyst NASA GSFC, Global Modeling and Assimilation Office Code 610.1, 8800 Greenbelt Rd, Greenbelt, MD 20771 Phone: 301-614-6712 Fax: 301-614-6246 http://science.gsfc.nasa.gov/sed/bio/matthew.thompson From: "Zhou, Hui" <[email protected]> Date: Tuesday, January 18, 2022 at 2:16 PM To: "[email protected]" <[email protected]> Cc: "Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]" <[email protected]> Subject: [EXTERNAL] Re: Help building MPICH as shared library with NAG Fortran and Clang Hi Matt, I suspect this is an issue in libtool. We'll take a look at it. We routinely test NAG compiler, but I guess we never tried clang+NAG. Once we figure out the issue, we typically will maintain custom patches to libtool until libtool fixes it upstream. -- Hui Zhou ________________________________ From: Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] via discuss <[email protected]> Sent: Tuesday, January 18, 2022 12:49 PM To: [email protected] <[email protected]> Cc: Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] <[email protected]> Subject: [mpich-discuss] Help building MPICH as shared library with NAG Fortran and Clang All, As the subject says, I'm having issues building MPICH as a shared library with NAG Fortran and Clang on my MacBook. I configured mpich as: ../configure FCFLAGS="-mismatch_all -fpp" FFLAGS="-mismatch_all -fpp" --prefix=$HOME/installed/Compiler/nag-7.0_7066/mpich/4.0rc3 |& tee configure.nag-7.0_7066.log where CC=clang, CXX=clang++, and FC=nagfor (set in environment). When I do this, the configure step is fine, but upon build: make[2]: Entering directory '/Users/mathomp4/src/MPI/mpich-4.0rc3/build-nag-7.0_7066' GEN lib/libmpifort.la NAG Fortran Compiler Release 7.0(Yurakucho) Build 7066 Option error: Unrecognised option -dynamiclib make[2]: *** [Makefile:7606: lib/libmpifort.la] Error 2 make[2]: Leaving directory '/Users/mathomp4/src/MPI/mpich-4.0rc3/build-nag-7.0_7066' make[1]: *** [Makefile:30237: all-recursive] Error 1 make[1]: Leaving directory '/Users/mathomp4/src/MPI/mpich-4.0rc3/build-nag-7.0_7066' make: *** [Makefile:7300: all] Error 2 The issue seems to be that MPICH (or libtool?) assumes that flags that clang accepts will be accepted by the Fortran compiler as well. But NAG doesn't accept '-dynamiclib' as an option. (I am asking NAG about this as well.) I can kind of see places where this is happening. For example in config.status: 749:archive_cmds_FC='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring $single_module' Now, the interesting thing is this *exact same* issue happened to me with Open MPI: https://www.mail-archive.com/[email protected]//msg34635.html<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mail-archive.com%2Fusers%40lists.open-mpi.org%2Fmsg34635.html&data=04%7C01%7Cmatthew.thompson%40nasa.gov%7C1b3d9ba46d434dc76bea08d9dab71612%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637781302163806283%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ua0iqGGzgrCOF70TeLqZSRambN%2BRkKx5XihYWxyck8U%3D&reserved=0> On that thread, I eventually figured out how to build Open MPI as static, but now I ran into this: https://discourse.cmake.org/t/cmake-and-mpi-fortran-cmake-doesnt-see-it/4869 My fear is that if I try and build MPICH as a static library, the same thing will happen. Does anyone at MPICH have any thoughts on this? Thanks, Matt -- Matt Thompson, SSAI, Ld Scientific Programmer/Analyst NASA GSFC, Global Modeling and Assimilation Office Code 610.1, 8800 Greenbelt Rd, Greenbelt, MD 20771 Phone: 301-614-6712 Fax: 301-614-6246 http://science.gsfc.nasa.gov/sed/bio/matthew.thompson
participants (1)
-
Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]