Summary: | improved configure logic for mpicc | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Dave Goodell <goodell> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | philippe.waroquiers |
Priority: | NOR | ||
Version: | 3.7 SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
mpicc detection patch against valgrind@11778
rebased against V @r11844 rebased against Valgrind @r12230 |
Created attachment 61426 [details]
rebased against V @r11844
The AIX deletion made this patch slightly cleaner, but it did cause a few rebase conflicts that I had to resolve by hand. I only quickly retested this version on Darwin.
Created attachment 64867 [details]
rebased against Valgrind @r12230
updating in order to make it easy to include this fix in the 3.7.0 release
Committed revision 12567. Thanks for the patch. |
Created attachment 60289 [details] mpicc detection patch against valgrind@11778 Version: 3.7 SVN OS: All Attached is a patch that improves the mpicc detection logic used at configure time in Valgrind. It isn't pretty, but IMO it's no uglier than the existing code and it is a more accurate check. Without this test error messages to the following effect would be obtained at make-time when the MPI implementation does not support shared libraries (MPICH2's default configuration): ----8<---- /usr/bin/ld: /homes/goodell/fusion/mpich2-installed/lib/libmpich.a(type_get_envelope.o): relocation R_X86_64_32S against `MPID_Datatype_builtin' can not be used when making a shared object; recompile with -fPIC /homes/goodell/fusion/mpich2-installed/lib/libmpich.a: could not read symbols: Bad value ----8<---- With the attached patch the configure step determines that such a link attempt will not succeed and disabled the MPI wrapper layer (akin to passing "--without-mpicc"). I've tested the patch on Linux/x86_64, Darwin/x86_64, and Darwin/i386. The Darwin linker doesn't seem to care about linking "-dynamic" code (or creating "-dynamiclib" shared libraries that link) against static libraries. But it does correctly cover the case where Darwin is being built bi-arch and the MPI library is i386- or x86_64-only. This code will get every so slightly less ugly once the AIX code is deleted (which I vaguely recall from the 3.7.0 release planning). The patch also fixes a couple of lines in the MPI test program in order to be a valid MPI program. It didn't really matter that much, since this code was never run (only linked), but it bugged me and I was already touching that code. Reproducible: Always