[MOAB-dev] r4149 - in MOAB/trunk: . config src src/moab src/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Sep 24 17:20:12 CDT 2010


Author: kraftche
Date: 2010-09-24 17:20:12 -0500 (Fri, 24 Sep 2010)
New Revision: 4149

Added:
   MOAB/trunk/config/mpe.m4
   MOAB/trunk/src/parallel/moab_mpe.c
   MOAB/trunk/src/parallel/moab_mpe.h
Modified:
   MOAB/trunk/configure.ac
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/src/moab/Core.hpp
   MOAB/trunk/src/parallel/Makefile.am
Log:
add configurable support for MPE

Added: MOAB/trunk/config/mpe.m4
===================================================================
--- MOAB/trunk/config/mpe.m4	                        (rev 0)
+++ MOAB/trunk/config/mpe.m4	2010-09-24 22:20:12 UTC (rev 4149)
@@ -0,0 +1,24 @@
+#######################################################################################
+# Configure support for MPE and LMPE libs for profiling/logging MPI calls
+# Arguments: None
+# Output:  Sets WITH_MPE to yes or no
+#          Sets MPE_LIBS to "-llmpe -lmpe" iff WITH_MPE == yes
+#######################################################################################
+AC_DEFUN([FATHOM_CHECK_MPE], [
+  AC_ARG_ENABLE([mpe],
+                [AC_HELP_STRING([--enable-mpe],
+                                [Enable use of MPE library for tracing/logging MPI communication])],
+                [WITH_MPE=$enableval],[WITH_MPE=no])
+  AC_LANG_PUSH([C])
+  if test "x$WITH_MPE" != "xno"; then
+    if test "x$WITH_MPE" != "xyes"; then
+      AC_MSG_ERROR(["Unexpected value for --enable-mpe option: $WITH_MPE])
+    fi
+    old_LIBS="$LIBS"
+    AC_CHECK_HEADER([mpe.h], [], [AC_MSG_ERROR([--enable-mpe failed because mpe.h was not found])])
+    AC_CHECK_LIB([mpe], [MPE_Init_log], [], [AC_MSG_ERROR([--enable-mpe failed because MPE library was not found])])
+    AC_CHECK_LIB([lmpe], [MPI_Init], [], [AC_MSG_ERROR([--enable-mpe failed because LMPE library was not found])], [-lmpe])
+    LIBS="$old_LIBS"
+    MPE_LIBS="-llmpe -lmpe"
+  fi
+])

Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac	2010-09-24 19:47:10 UTC (rev 4148)
+++ MOAB/trunk/configure.ac	2010-09-24 22:20:12 UTC (rev 4149)
@@ -274,6 +274,13 @@
   AC_DEFINE_UNQUOTED([MB_SEEK_END],[$SEEK_END],["Value of C SEEK_END"])
 fi
 
+if test "xyes" = "x$WITH_MPI"; then
+  FATHOM_CHECK_MPE
+  AC_SUBST([WITH_MPE])
+  AC_SUBST([MPE_LIBS])
+  test "xyes" != "x$WITH_MPE" || AM_CPPFLAGS="$AM_CPPFLAGS -DUSE_MPE"
+fi
+
 ################################################################################
 #                              HDF5 OPTIONS
 ################################################################################

Modified: MOAB/trunk/src/Core.cpp
===================================================================


More information about the moab-dev mailing list