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
Created attachment 375214 [details] emerge --info
Please attach the entire (failing) build log(s) to this bug report.
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.
Created attachment 375252 [details, diff] Proposed changes, patch against hypre-2.9.0.ebuild
Created attachment 375254 [details] build log for +mpi -lapack -fortran
Created attachment 375256 [details] build log for fixed mpi configuration, +mpi +lapack +fortran
+ 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 +
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.
+ 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 +