File: use-mpich-if-mpic-not-found.patch

package info (click to toggle)
valgrind 1%3A3.25.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 180,392 kB
  • sloc: ansic: 827,945; exp: 26,134; xml: 23,776; asm: 14,769; cpp: 9,431; makefile: 7,680; sh: 6,687; perl: 5,451; python: 1,498; javascript: 981; awk: 166; csh: 1
file content (33 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: configure mpich on 32-bit archs
  Package mpi-defaults has been altered to depend on
  mpich on 32-bit architectures, while continuing with
  mpi-c on 64-bit. Alter the configure script to attempt
  configuring mpi-c first and mpich if the former isn't
  available.
Forwarded: not-needed
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/2078264
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079874
Author: Pushkar Kulkarni <pushkar.kulkarni@canonical.com>
--- a/configure.ac
+++ b/configure.ac
@@ -5112,12 +5112,18 @@
            [CFLAGS_MPI="-g -O -fno-omit-frame-pointer -Wall -fpic"
             LDFLAGS_MPI="-fpic -shared"])
 
+# configure openmpi/mpi-c if available, fallback to mpich if not
 PKG_CHECK_MODULES([MPI_C],[mpi-c],[
 	CFLAGS_MPI="$CFLAGS_MPI $MPI_C_CFLAGS"
 	LDFLAGS_MPI="$LDFLAGS_MPI $MPI_C_LIBS"
 ],[
-   	CFLAGS_MPI="$CFLAGS_MPI `$MPI_CC -showme:compile`"
-	LDFLAGS_MPI="$LDFLAGS_MPI `$MPI_CC -showme:link`"
+	PKG_CHECK_MODULES([MPI_C], [mpich], [
+		CFLAGS_MPI="$CFLAGS_MPI $MPI_C_CFLAGS"
+		LDFLAGS_MPI="$LDFLAGS_MPI $MPI_C_LIBS"
+	],[
+   		CFLAGS_MPI="$CFLAGS_MPI `$MPI_CC -showme:compile`"
+		LDFLAGS_MPI="$LDFLAGS_MPI `$MPI_CC -showme:link`"
+	])
 ])
 
 AC_SUBST([CFLAGS_MPI])