]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Small fix for check_openmpi.m4
authorgdd <gdd>
Wed, 24 Nov 2010 12:32:43 +0000 (12:32 +0000)
committergdd <gdd>
Wed, 24 Nov 2010 12:32:43 +0000 (12:32 +0000)
Improve check_hdf5.m4 to detect hdf5 parallel. If detected, check_openmpi.m4 is called.

salome_adm/unix/config_files/check_hdf5.m4
salome_adm/unix/config_files/check_openmpi.m4

index c76cb563bc530b6a706e648bd3e79a373a8f8490..d827d3f73a1769a6c034b99e11d8cab3c79f7249 100644 (file)
@@ -50,6 +50,8 @@ if test -z $HDF5HOME
 then
    AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
    AC_MSG_NOTICE(Trying native Hdf5...)
+   dnl For Parallel HDF5 test
+   HDF5HOME="/usr" 
 else
    LOCAL_INCLUDES="-I$HDF5HOME/include"
    if test "x$HDF5HOME" = "x/usr"
@@ -63,6 +65,28 @@ else
    fi
 fi
 
+hdf5_parallel=0
+
+if  test "x$hdf5_ok" = "xno"
+then
+  if  test -e "$HDF5HOME/include/hdf5.h" 
+  then
+    AC_MSG_NOTICE(Checking if hdf5 is parallel and thus needs mpi...)
+    hdf5_parallel=`grep "#define H5_HAVE_PARALLEL" $HDF5HOME/include/H5pubconf.h | awk '{i=3 ; print $i}'`
+    if test "x$hdf5_parallel" = "x1"
+    then
+      AC_MSG_RESULT(***** Yes: checking MPI...******)
+      CHECK_MPI
+      AC_MSG_RESULT(***** Checking MPI done...******)
+      LOCAL_INCLUDES="-DOMPI_SKIP_MPICXX $MPI_INCLUDES $LOCAL_INCLUDES"
+    else
+      AC_MSG_RESULT(No,hdf5 seems serial)
+    fi
+  else
+    AC_MSG_WARN(File $HDF5HOME/include/hdf5.h not present)
+  fi
+fi
+
 dnl hdf5 headers
 
 CPPFLAGS_old="$CPPFLAGS"
index e2ae5b36c5084431f80609af4049313342a6a77f..1d18b6332995c48aae5c7fa87b6c0b4fac5b8eb5 100644 (file)
@@ -36,7 +36,12 @@ if test "$WITHOPENMPI" = yes; then
     else  
       MPI_INCLUDES=`$OPENMPI_HOME/bin/mpicxx --showme:compile`
     fi
-    MPI_LIBS=`$OPENMPI_HOME/bin/mpicxx --showme:link`
+    dnl Small modification for native debian-based distributions
+    if test "$OPENMPI_HOME" = "/usr/lib/openmpi"; then
+      MPI_LIBS=`mpicxx --showme:link`
+    else
+      MPI_LIBS=`$OPENMPI_HOME/bin/mpicxx --showme:link`
+    fi
   fi
 
   CPPFLAGS_old="$CPPFLAGS"