Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508030 - sci-libs/hypre USE=mpi - mli_utils.c:(.text+0x2cf7): undefined reference to `hypre_dgesvd' / cfei_hypre.cxx:(.text...): undefined reference to `ompi_mpi_cxx_op_intercept'
Summary: sci-libs/hypre USE=mpi - mli_utils.c:(.text+0x2cf7): undefined reference to `...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-18 17:08 UTC by Matthias Maier
Modified: 2014-06-09 03:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.40 KB, text/plain)
2014-04-18 17:09 UTC, Matthias Maier
Details
Proposed changes, patch against hypre-2.9.0.ebuild (hypre-2.9.0b.ebuild.diff,570 bytes, patch)
2014-04-18 23:37 UTC, Matthias Maier
Details | Diff
build log for +mpi -lapack -fortran (hypre-lapackfortran.log,177.59 KB, text/plain)
2014-04-18 23:41 UTC, Matthias Maier
Details
build log for fixed mpi configuration, +mpi +lapack +fortran (hypre-mpi.log,168.52 KB, text/plain)
2014-04-18 23:42 UTC, Matthias Maier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2014-04-18 17:08:52 UTC
The hypre ebuild currently horribly fails in different ways if +mpi is specified:

+mpi -lapack -fortran:
  fails at link time due to unresolved (hypre internal) references

+mpi +lapack +fortran:
  compiles and installs a misconfigured hypre version _without_ mpi support.


I have success in getting a correctly compiled hypre library with

 - also enabling +lapack +fortran

 - Setting CC=mpicc, CXX=mpicxx FC=mpif77

 - Removing --without-strict-checking in the ebuild
   (otherwise HYPRE_SEQUENTIAL is defined)

After the configure phase src/HYPRE_config.h must define HYPRE_HAVE_MPI and must not define HYPRE_SEQUENTIAL

Reproducible: Always
Comment 1 Matthias Maier gentoo-dev 2014-04-18 17:09:19 UTC
Created attachment 375214 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-18 22:37:34 UTC
Please attach the entire (failing) build log(s) to this bug report.
Comment 3 Matthias Maier gentoo-dev 2014-04-18 23:34:56 UTC
I'm sorry for the confusing title. Let me explain in more detail:

a) emerging hypre with +mpi -lapack -fortran results in an (internal) underlinkage problem. This looks like bug 493222. See attached hypre-lapackfortran.log.
I haven't observed this underlinkage problem with -mpi

b) Emerging hypre with +mpi +lapack +fortran compiles and installs but *misconfigures* the library (no actual mpi support). This is due to the following two problems:

 - The configuration option "--without-strict-checking" passed to euse actually disables mpi support by declaring unconditionally:

/var/tmp/portage/sci-libs/hypre-2.9.0b/work/hypre-2.9.0b/src/HYPRE_config.h
    59 /* Disable MPI, enable serial codes */
    60 /* #undef HYPRE_SEQUENTIAL */

   And which is confirmed by $ ldd /usr/lib64/libHYPRE.so.

 - Removing the "--without-strict-checking" option from the ebuild results in an underlinkage problem due to missing linkage to the mpi libraries. See attached hypre-mpi.log. A fix for this is to use the appropriate mpi wrappers for compilation and linkage.

I therefore suggest to

 - add a use constraint implying +lapack +fortran if +mpi.
 - remove --without-strict-checking from the configure line
 - Use the mpi wrapper for compilation and linkage if +mpi is set.

See attached ebuild diff.
Comment 4 Matthias Maier gentoo-dev 2014-04-18 23:37:31 UTC
Created attachment 375252 [details, diff]
Proposed changes, patch against hypre-2.9.0.ebuild
Comment 5 Matthias Maier gentoo-dev 2014-04-18 23:41:34 UTC
Created attachment 375254 [details]
build log for +mpi -lapack -fortran
Comment 6 Matthias Maier gentoo-dev 2014-04-18 23:42:34 UTC
Created attachment 375256 [details]
build log for fixed mpi configuration, +mpi +lapack +fortran
Comment 7 Sébastien Fabbro (RETIRED) gentoo-dev 2014-04-22 17:27:58 UTC
+  22 Apr 2014; Sébastien Fabbro <bicatali@gentoo.org> -hypre-2.8.0b-r1.ebuild,
+  hypre-2.9.0b.ebuild:
+  Forced fortran and lapack settings when mpi is set, secure mpi toolchain
+  propagation, bug #508030 thanks Matthias Maier
+
Comment 8 Matthias Maier gentoo-dev 2014-05-01 12:38:08 UTC
The new ebuild version has all requested changes except that it still configures with the "--without-strict-checking" option. With this, MPI support is still broken...

Don't ask me why but the hypre's configure script chooses to interpret "--without-strict-checking" exactly as "--with-strict-checking", which reads:

  --with-strict-checking
      Compiles without MPI ('--without-MPI') and tries to find a compiler option that warns of as many non-ISO features as possible.


Furthermore, I did a mistake with respect to the use flag constraints. "mpi? ( fortran lapack )" is not necessary. Lapack is just a mandatory build time dependency. I will comment this in bug 493222, where it belongs to.
Comment 9 Sébastien Fabbro (RETIRED) gentoo-dev 2014-06-09 03:18:52 UTC
+  09 Jun 2014; Sébastien Fabbro <bicatali@gentoo.org> hypre-2.9.0b.ebuild:
+  Fixed underlinking (bug #493222) and enabling MPI (bug #508030) thanks
+  Matthias Maier
+