Removes MPE instrumentation support. (#2245)

* Removes MPE instrumentation support.

The Autotools will no longer accept --with-mpe= and the logging commands
have been removed from the FUNC_ENTER macros. CMake has never supported
instrumenting for MPE.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Dana Robinson
2022-11-09 11:06:26 -08:00
committed by GitHub
parent 18c438bdf0
commit d93c6fae43
11 changed files with 23 additions and 217 deletions

View File

@@ -143,7 +143,7 @@ foreach $arg (@ARGV) {
next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/; next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/;
# These are MPI function calls. Ignore them. # These are MPI function calls. Ignore them.
next if $name =~ /^(MPI_|MPE_)/; next if $name =~ /^(MPI_)/;
# These are POSIX threads function calls. Ignore them. # These are POSIX threads function calls. Ignore them.
next if $name =~ /^pthread_/; next if $name =~ /^pthread_/;

View File

@@ -61,26 +61,21 @@ STDOUT_FILTER() {
# Remove them from the stderr result file. # Remove them from the stderr result file.
# $1 is the file name of the file to be filtered. # $1 is the file name of the file to be filtered.
# Cases of filter needed: # Cases of filter needed:
# 1. MPE: # * LANL MPI:
# In parallel mode and if MPE library is used, it prints the following
# two message lines whether the MPE tracing is used or not.
# Writing logfile.
# Finished writing logfile.
# 2. LANL MPI:
# The LANL MPI will print some messages like the following, # The LANL MPI will print some messages like the following,
# LA-MPI: *** mpirun (1.5.10) # LA-MPI: *** mpirun (1.5.10)
# LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22 # LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22
# LA-MPI: *** libmpi (1.5.10) # LA-MPI: *** libmpi (1.5.10)
# LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory # LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory
# 3. h5diff debug output: # * h5diff debug output:
# Debug output all have prefix "h5diff debug: ". # Debug output all have prefix "h5diff debug: ".
# 4. AIX system prints messages like these when it is aborting: # * AIX system prints messages like these when it is aborting:
# ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0 # ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0
# ERROR: 0031-250 task 4: Terminated # ERROR: 0031-250 task 4: Terminated
# ERROR: 0031-250 task 3: Terminated # ERROR: 0031-250 task 3: Terminated
# ERROR: 0031-250 task 2: Terminated # ERROR: 0031-250 task 2: Terminated
# ERROR: 0031-250 task 1: Terminated # ERROR: 0031-250 task 1: Terminated
# 5. LLNL Blue-Gene mpirun prints messages like there when it exit non-zero: # * LLNL Blue-Gene mpirun prints messages like there when it exit non-zero:
# <Apr 12 15:01:49.075658> BE_MPI (ERROR): The error message in the job record is as follows: # <Apr 12 15:01:49.075658> BE_MPI (ERROR): The error message in the job record is as follows:
# <Apr 12 15:01:49.075736> BE_MPI (ERROR): "killed by exit(1) on node 0" # <Apr 12 15:01:49.075736> BE_MPI (ERROR): "killed by exit(1) on node 0"
STDERR_FILTER() { STDERR_FILTER() {
@@ -91,12 +86,6 @@ STDERR_FILTER() {
cp $result_file $tmp_file cp $result_file $tmp_file
sed -e '/ BE_MPI (ERROR): /d' \ sed -e '/ BE_MPI (ERROR): /d' \
< $tmp_file > $result_file < $tmp_file > $result_file
# Filter MPE messages
if test -n "$pmode"; then
cp $result_file $tmp_file
sed -e '/^Writing logfile./d' -e '/^Finished writing logfile./d' \
< $tmp_file > $result_file
fi
# Filter LANL MPI messages # Filter LANL MPI messages
# and LLNL srun messages # and LLNL srun messages
# and AIX error messages # and AIX error messages

View File

@@ -198,9 +198,6 @@
/* Define to 1 if you have the `m' library (-lm). */ /* Define to 1 if you have the `m' library (-lm). */
#cmakedefine H5_HAVE_LIBM @H5_HAVE_LIBM@ #cmakedefine H5_HAVE_LIBM @H5_HAVE_LIBM@
/* Define to 1 if you have the `mpe' library (-lmpe). */
#cmakedefine H5_HAVE_LIBMPE @H5_HAVE_LIBMPE@
/* Define to 1 if you have the `pthread' library (-lpthread). */ /* Define to 1 if you have the `pthread' library (-lpthread). */
#cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@ #cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@
@@ -225,12 +222,6 @@
/* Define whether the Mirror virtual file driver (VFD) will be compiled */ /* Define whether the Mirror virtual file driver (VFD) will be compiled */
#cmakedefine H5_HAVE_MIRROR_VFD @H5_HAVE_MIRROR_VFD@ #cmakedefine H5_HAVE_MIRROR_VFD @H5_HAVE_MIRROR_VFD@
/* Define if we have MPE support */
#cmakedefine H5_HAVE_MPE @H5_HAVE_MPE@
/* Define to 1 if you have the <mpe.h> header file. */
#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@
/* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */ /* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@

View File

@@ -77,7 +77,6 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
Default API mapping: @DEFAULT_API_VERSION@ Default API mapping: @DEFAULT_API_VERSION@
With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@ With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@ I/O filters (external): @EXTERNAL_FILTERS@
MPE: @H5_HAVE_LIBLMPE@
Direct VFD: @H5_HAVE_DIRECT@ Direct VFD: @H5_HAVE_DIRECT@
Mirror VFD: @H5_HAVE_MIRROR_VFD@ Mirror VFD: @H5_HAVE_MIRROR_VFD@
Subfiling VFD: @H5_HAVE_SUBFILING_VFD@ Subfiling VFD: @H5_HAVE_SUBFILING_VFD@

View File

@@ -87,8 +87,7 @@ F9XMODFLAG=@F9XMODFLAG@
# .chkexe files are used to mark tests that have run successfully. # .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests. # .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option. CHECK_CLEANFILES=*.chkexe *.chklog
CHECK_CLEANFILES=*.chkexe *.chklog *.clog *.clog2
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. # List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
# This tells the Makefiles that these targets are not files to be built but # This tells the Makefiles that these targets are not files to be built but

View File

@@ -2682,7 +2682,6 @@ esac
## build also needs to have values defined. ## build also needs to have values defined.
## ##
AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no"
AC_SUBST([MPE]) MPE=no
AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no
AC_SUBST([PARALLEL_FILTERED_WRITES]) AC_SUBST([PARALLEL_FILTERED_WRITES])
AC_SUBST([LARGE_PARALLEL_IO]) AC_SUBST([LARGE_PARALLEL_IO])
@@ -2781,69 +2780,6 @@ if test -n "$PARALLEL"; then
;; ;;
esac esac
## --------------------------------------------------------------------
## Do we want MPE instrumentation feature on?
##
## This must be done after enable-parallel is checked since it depends
## on a mpich compiler.
##
MPE=yes
AC_ARG_WITH([mpe],
[AS_HELP_STRING([--with-mpe=DIR],
[Use MPE instrumentation [default=no]])],,
[withval=no])
case "X-$withval" in
X-|X-no|X-none)
AC_MSG_CHECKING([for MPE])
AC_MSG_RESULT([suppressed])
unset MPE
;;
X-yes)
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE])
;;
*)
case "$withval" in
*,*)
mpe_inc="`echo $withval | cut -f1 -d,`"
mpe_lib="`echo $withval | cut -f2 -d, -s`"
;;
*)
if test -n "$withval"; then
mpe_inc="$withval/include"
mpe_lib="$withval/lib"
fi
;;
esac
if test -n "$mpe_inc"; then
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$mpe_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$mpe_inc"
AC_CHECK_HEADERS([mpe.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset MPE])
else
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
fi
if test -n "$mpe_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
LDFLAGS="$LDFLAGS -L$mpe_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$mpe_lib"
AC_CHECK_LIB([mpe], [MPE_Init_log],,
[LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset MPE])
else
AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE])
fi
;;
esac
if test "X-$MPE" = "X-yes"; then
AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support])
fi
## ---------------------------------------------------------------------- ## ----------------------------------------------------------------------
## Check for the MPI functions necessary for the Parallel Compression ## Check for the MPI functions necessary for the Parallel Compression
## feature. If these are not present, issue a warning that Parallel ## feature. If these are not present, issue a warning that Parallel

View File

@@ -47,7 +47,19 @@ New Features
Configuration: Configuration:
------------- -------------
- Removal of dmalloc support - Removal of MPE support
The ability to build with MPE instrumentation has been removed along with
the following configure options:
Autotools:
--with-mpe=
CMake has never supported building with MPE support.
(DER - 2022/11/08)
- Removal of dmalloc support
The ability to build with dmalloc support has been removed along with The ability to build with dmalloc support has been removed along with
the following configure options: the following configure options:

View File

@@ -84,10 +84,6 @@ hbool_t H5_libterm_g = FALSE; /* Library isn't being shutdown */
hbool_t H5_use_selection_io_g = FALSE; hbool_t H5_use_selection_io_g = FALSE;
#ifdef H5_HAVE_MPE
hbool_t H5_MPEinit_g = FALSE; /* MPE Library hasn't been initialized */
#endif
char H5_lib_vers_info_g[] = H5_VERS_INFO; char H5_lib_vers_info_g[] = H5_VERS_INFO;
static hbool_t H5_dont_atexit_g = FALSE; static hbool_t H5_dont_atexit_g = FALSE;
H5_debug_t H5_debug_g; /* debugging info */ H5_debug_t H5_debug_g; /* debugging info */
@@ -168,18 +164,6 @@ H5_init_library(void)
MPI_Initialized(&mpi_initialized); MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized); MPI_Finalized(&mpi_finalized);
#ifdef H5_HAVE_MPE
/* Initialize MPE instrumentation library. */
if (!H5_MPEinit_g) {
int mpe_code;
if (mpi_initialized && !mpi_finalized) {
mpe_code = MPE_Init_log();
HDassert(mpe_code >= 0);
H5_MPEinit_g = TRUE;
}
}
#endif /*H5_HAVE_MPE*/
/* add an attribute on MPI_COMM_SELF to call H5_term_library /* add an attribute on MPI_COMM_SELF to call H5_term_library
when it is destroyed, i.e. on MPI_Finalize */ when it is destroyed, i.e. on MPI_Finalize */
if (mpi_initialized && !mpi_finalized) { if (mpi_initialized && !mpi_finalized) {
@@ -510,26 +494,6 @@ H5_term_library(void)
} /* end if */ } /* end if */
} /* end if */ } /* end if */
#ifdef H5_HAVE_MPE
/* Close MPE instrumentation library. May need to move this
* down if any of the below code involves using the instrumentation code.
*/
if (H5_MPEinit_g) {
int mpi_initialized;
int mpi_finalized;
int mpe_code;
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if (mpi_initialized && !mpi_finalized) {
mpe_code = MPE_Finish_log("h5log");
HDassert(mpe_code >= 0);
} /* end if */
H5_MPEinit_g = FALSE; /* turn it off no matter what */
} /* end if */
#endif
/* Free open debugging streams */ /* Free open debugging streams */
while (H5_debug_g.open_stream) { while (H5_debug_g.open_stream) {
H5_debug_open_stream_t *tmp_open_stream; H5_debug_open_stream_t *tmp_open_stream;

View File

@@ -148,67 +148,6 @@
#define HASH_NONFATAL_OOM 1 /* Don't abort() on out-of-memory */ #define HASH_NONFATAL_OOM 1 /* Don't abort() on out-of-memory */
#include "uthash.h" #include "uthash.h"
/*
* MPE Instrumentation support
*/
#ifdef H5_HAVE_MPE
/*------------------------------------------------------------------------
* Purpose: Begin to collect MPE log information for a function. It should
* be ahead of the actual function's process.
*
* Programmer: Long Wang
*
*------------------------------------------------------------------------
*/
#include "mpe.h"
/*
* #define eventa(func_name) h5_mpe_ ## func_name ## _a
* #define eventb(func_name) h5_mpe_ ## func_name ## _b
*/
#define eventa(func_name) h5_mpe_eventa
#define eventb(func_name) h5_mpe_eventb
#define MPE_LOG_VARS \
static int eventa(__func__) = -1; \
static int eventb(__func__) = -1; \
char p_event_start[128];
/* Hardwire the color to "red", since that's what all the routines are using
* now. In the future, if we want to change that color for a given routine,
* we should define a "FUNC_ENTER_API_COLOR" macro which takes an extra 'color'
* parameter and then make additional FUNC_ENTER_<foo>_COLOR macros to get that
* color information down to the BEGIN_MPE_LOG macro (which should have a new
* BEGIN_MPE_LOG_COLOR variant). -QAK
*/
#define BEGIN_MPE_LOG \
if (H5_MPEinit_g) { \
snprintf(p_event_start, sizeof(p_event_start), "start %s", __func__); \
if (eventa(__func__) == -1 && eventb(__func__) == -1) { \
const char *p_color = "red"; \
eventa(__func__) = MPE_Log_get_event_number(); \
eventb(__func__) = MPE_Log_get_event_number(); \
MPE_Describe_state(eventa(__func__), eventb(__func__), __func__, p_color); \
} \
MPE_Log_event(eventa(__func__), 0, p_event_start); \
}
/*------------------------------------------------------------------------
* Purpose: Finish the collection of MPE log information for a function.
* It should be after the actual function's process.
*
* Programmer: Long Wang
*/
#define FINISH_MPE_LOG \
if (H5_MPEinit_g) { \
MPE_Log_event(eventb(__func__), 0, __func__); \
}
#else /* H5_HAVE_MPE */
#define MPE_LOG_VARS /* void */
#define BEGIN_MPE_LOG /* void */
#define FINISH_MPE_LOG /* void */
#endif /* H5_HAVE_MPE */
/* /*
* NT doesn't define SIGBUS, but since NT only runs on processors * NT doesn't define SIGBUS, but since NT only runs on processors
* that do not have alignment constraints a SIGBUS would never be * that do not have alignment constraints a SIGBUS would never be
@@ -2046,10 +1985,6 @@ H5_DLLVAR hbool_t H5_use_selection_io_g;
#define H5_POP_FUNC /* void */ #define H5_POP_FUNC /* void */
#endif /* H5_HAVE_CODESTACK */ #endif /* H5_HAVE_CODESTACK */
#ifdef H5_HAVE_MPE
extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
#endif
/* Forward declaration of H5CXpush() / H5CXpop() */ /* Forward declaration of H5CXpush() / H5CXpop() */
/* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */ /* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */
H5_DLL herr_t H5CX_push(void); H5_DLL herr_t H5CX_push(void);
@@ -2091,9 +2026,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
H5_API_LOCK H5_API_LOCK
/* Local variables for API routines */ /* Local variables for API routines */
#define FUNC_ENTER_API_VARS \ #define FUNC_ENTER_API_VARS H5TRACE_DECL
MPE_LOG_VARS \
H5TRACE_DECL
#define FUNC_ENTER_API_COMMON \ #define FUNC_ENTER_API_COMMON \
FUNC_ENTER_API_VARS \ FUNC_ENTER_API_VARS \
@@ -2115,9 +2048,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
if (H5CX_push() < 0) \ if (H5CX_push() < 0) \
HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \ HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \
else \ else \
api_ctx_pushed = TRUE; \ api_ctx_pushed = TRUE;
\
BEGIN_MPE_LOG
/* Use this macro for all "normal" API functions */ /* Use this macro for all "normal" API functions */
#define FUNC_ENTER_API(err) \ #define FUNC_ENTER_API(err) \
@@ -2159,7 +2090,6 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
{ \ { \
FUNC_ENTER_API_COMMON \ FUNC_ENTER_API_COMMON \
H5_PUSH_FUNC \ H5_PUSH_FUNC \
BEGIN_MPE_LOG \
{ {
/* /*
@@ -2177,13 +2107,12 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
FUNC_ENTER_API_VARS \ FUNC_ENTER_API_VARS \
FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \ FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \
FUNC_ENTER_API_THREADSAFE; \ FUNC_ENTER_API_THREADSAFE; \
BEGIN_MPE_LOG \
{ {
/* /*
* Use this macro for API functions that should only perform initialization * Use this macro for API functions that should only perform initialization
* of the library or an interface, but not push any state (API context, * of the library or an interface, but not push any state (API context,
* function name, start MPE logging, etc) examples are: H5open. * function name, etc.) examples are: H5open.
* *
*/ */
#define FUNC_ENTER_API_NOPUSH(err) \ #define FUNC_ENTER_API_NOPUSH(err) \
@@ -2371,9 +2300,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
H5_API_UNLOCK \ H5_API_UNLOCK \
H5_API_SET_CANCEL H5_API_SET_CANCEL
#define FUNC_LEAVE_API_COMMON(ret_value) \ #define FUNC_LEAVE_API_COMMON(ret_value) H5TRACE_RETURN(ret_value);
FINISH_MPE_LOG \
H5TRACE_RETURN(ret_value);
#define FUNC_LEAVE_API(ret_value) \ #define FUNC_LEAVE_API(ret_value) \
; \ ; \

View File

@@ -79,7 +79,6 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
Default API mapping: @DEFAULT_API_VERSION@ Default API mapping: @DEFAULT_API_VERSION@
With deprecated public symbols: @DEPRECATED_SYMBOLS@ With deprecated public symbols: @DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@ I/O filters (external): @EXTERNAL_FILTERS@
MPE: @MPE@
Map (H5M) API: @MAP_API@ Map (H5M) API: @MAP_API@
Direct VFD: @DIRECT_VFD@ Direct VFD: @DIRECT_VFD@
Mirror VFD: @MIRROR_VFD@ Mirror VFD: @MIRROR_VFD@

View File

@@ -209,10 +209,6 @@ struct datum *data = NULL;
#define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES #define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES
#define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10) #define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10)
/* Use a smaller test size to avoid creating huge MPE logfiles. */
#ifdef H5_HAVE_MPE
#define MPE_VIRT_NUM_DATA_ENTIES (NUM_DATA_ENTRIES / 100)
#endif
int virt_num_data_entries = NUM_DATA_ENTRIES; int virt_num_data_entries = NUM_DATA_ENTRIES;
@@ -6919,12 +6915,6 @@ main(int argc, char **argv)
else else
virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES;
#ifdef H5_HAVE_MPE
if (MAINPROCESS)
HDprintf(" Tests compiled for MPE.\n");
virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES;
#endif /* H5_HAVE_MPE */
if (MAINPROCESS) { if (MAINPROCESS) {
HDprintf("===================================\n"); HDprintf("===================================\n");
HDprintf("Parallel metadata cache tests\n"); HDprintf("Parallel metadata cache tests\n");