From d93c6fae4313c497ca1383d1aef24203a29b5087 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Wed, 9 Nov 2022 11:06:26 -0800 Subject: 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> --- bin/checkposix | 2 +- bin/output_filter.sh | 19 ++------ config/cmake/H5pubconf.h.in | 9 ---- config/cmake/libhdf5.settings.cmake.in | 1 - config/commence.am | 3 +- configure.ac | 64 --------------------------- release_docs/RELEASE.txt | 14 +++++- src/H5.c | 36 --------------- src/H5private.h | 81 ++-------------------------------- src/libhdf5.settings.in | 1 - testpar/t_cache.c | 10 ----- 11 files changed, 23 insertions(+), 217 deletions(-) diff --git a/bin/checkposix b/bin/checkposix index 52aee8b..ee12d44 100755 --- a/bin/checkposix +++ b/bin/checkposix @@ -143,7 +143,7 @@ foreach $arg (@ARGV) { next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/; # These are MPI function calls. Ignore them. - next if $name =~ /^(MPI_|MPE_)/; + next if $name =~ /^(MPI_)/; # These are POSIX threads function calls. Ignore them. next if $name =~ /^pthread_/; diff --git a/bin/output_filter.sh b/bin/output_filter.sh index ba68cb3..a2216fd 100644 --- a/bin/output_filter.sh +++ b/bin/output_filter.sh @@ -61,26 +61,21 @@ STDOUT_FILTER() { # Remove them from the stderr result file. # $1 is the file name of the file to be filtered. # Cases of filter needed: -# 1. MPE: -# 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: +# * LANL MPI: # The LANL MPI will print some messages like the following, # LA-MPI: *** mpirun (1.5.10) # LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22 # LA-MPI: *** libmpi (1.5.10) # LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory -# 3. h5diff debug output: +# * h5diff debug output: # 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-250 task 4: Terminated # ERROR: 0031-250 task 3: Terminated # ERROR: 0031-250 task 2: 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: # BE_MPI (ERROR): The error message in the job record is as follows: # BE_MPI (ERROR): "killed by exit(1) on node 0" STDERR_FILTER() { @@ -91,12 +86,6 @@ STDERR_FILTER() { cp $result_file $tmp_file sed -e '/ BE_MPI (ERROR): /d' \ < $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 # and LLNL srun messages # and AIX error messages diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 2eb4005..c1b051f 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -198,9 +198,6 @@ /* Define to 1 if you have the `m' library (-lm). */ #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). */ #cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@ @@ -225,12 +222,6 @@ /* Define whether the Mirror virtual file driver (VFD) will be compiled */ #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 header file. */ -#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@ - /* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@ diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 85f8842..625b0c0 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -77,7 +77,6 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@ Default API mapping: @DEFAULT_API_VERSION@ With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@ I/O filters (external): @EXTERNAL_FILTERS@ - MPE: @H5_HAVE_LIBLMPE@ Direct VFD: @H5_HAVE_DIRECT@ Mirror VFD: @H5_HAVE_MIRROR_VFD@ Subfiling VFD: @H5_HAVE_SUBFILING_VFD@ diff --git a/config/commence.am b/config/commence.am index 98abd79..1f0dc2e 100644 --- a/config/commence.am +++ b/config/commence.am @@ -87,8 +87,7 @@ F9XMODFLAG=@F9XMODFLAG@ # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. -CHECK_CLEANFILES=*.chkexe *.chklog *.clog *.clog2 +CHECK_CLEANFILES=*.chkexe *.chklog # 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 diff --git a/configure.ac b/configure.ac index c12c0f2..eea7537 100644 --- a/configure.ac +++ b/configure.ac @@ -2682,7 +2682,6 @@ esac ## build also needs to have values defined. ## AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" -AC_SUBST([MPE]) MPE=no AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no AC_SUBST([PARALLEL_FILTERED_WRITES]) AC_SUBST([LARGE_PARALLEL_IO]) @@ -2781,69 +2780,6 @@ if test -n "$PARALLEL"; then ;; 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 ## feature. If these are not present, issue a warning that Parallel diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ba79997..47c9730 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -47,7 +47,19 @@ New Features 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 following configure options: diff --git a/src/H5.c b/src/H5.c index dbd109c..89330fe 100644 --- a/src/H5.c +++ b/src/H5.c @@ -84,10 +84,6 @@ hbool_t H5_libterm_g = FALSE; /* Library isn't being shutdown */ 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; static hbool_t H5_dont_atexit_g = FALSE; H5_debug_t H5_debug_g; /* debugging info */ @@ -168,18 +164,6 @@ H5_init_library(void) MPI_Initialized(&mpi_initialized); 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 when it is destroyed, i.e. on MPI_Finalize */ if (mpi_initialized && !mpi_finalized) { @@ -510,26 +494,6 @@ H5_term_library(void) } /* 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 */ while (H5_debug_g.open_stream) { H5_debug_open_stream_t *tmp_open_stream; diff --git a/src/H5private.h b/src/H5private.h index 78df3fd..0b68305 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -149,67 +149,6 @@ #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__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 * that do not have alignment constraints a SIGBUS would never be * raised, so we just replace it with SIGILL (which also should @@ -2046,10 +1985,6 @@ H5_DLLVAR hbool_t H5_use_selection_io_g; #define H5_POP_FUNC /* void */ #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() */ /* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */ 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 /* Local variables for API routines */ -#define FUNC_ENTER_API_VARS \ - MPE_LOG_VARS \ - H5TRACE_DECL +#define FUNC_ENTER_API_VARS H5TRACE_DECL #define FUNC_ENTER_API_COMMON \ FUNC_ENTER_API_VARS \ @@ -2115,9 +2048,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); if (H5CX_push() < 0) \ HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \ else \ - api_ctx_pushed = TRUE; \ - \ - BEGIN_MPE_LOG + api_ctx_pushed = TRUE; /* Use this macro for all "normal" API functions */ #define FUNC_ENTER_API(err) \ @@ -2159,7 +2090,6 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ FUNC_ENTER_API_COMMON \ 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_COMMON_NOERR(H5_IS_API(__func__)); \ FUNC_ENTER_API_THREADSAFE; \ - BEGIN_MPE_LOG \ { /* * Use this macro for API functions that should only perform initialization * 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) \ @@ -2371,9 +2300,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); H5_API_UNLOCK \ H5_API_SET_CANCEL -#define FUNC_LEAVE_API_COMMON(ret_value) \ - FINISH_MPE_LOG \ - H5TRACE_RETURN(ret_value); +#define FUNC_LEAVE_API_COMMON(ret_value) H5TRACE_RETURN(ret_value); #define FUNC_LEAVE_API(ret_value) \ ; \ diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 73135aa..9e95bd3 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -79,7 +79,6 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@ Default API mapping: @DEFAULT_API_VERSION@ With deprecated public symbols: @DEPRECATED_SYMBOLS@ I/O filters (external): @EXTERNAL_FILTERS@ - MPE: @MPE@ Map (H5M) API: @MAP_API@ Direct VFD: @DIRECT_VFD@ Mirror VFD: @MIRROR_VFD@ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 9b3e40d..ae47a6f 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -209,10 +209,6 @@ struct datum *data = NULL; #define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES #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; @@ -6919,12 +6915,6 @@ main(int argc, char **argv) else 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) { HDprintf("===================================\n"); HDprintf("Parallel metadata cache tests\n"); -- cgit v0.12