diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-11-09 19:06:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 19:06:26 (GMT) |
commit | d93c6fae4313c497ca1383d1aef24203a29b5087 (patch) | |
tree | 3c91e02d3d64182a726eaf68fe8ce28e63ecf5d0 /src | |
parent | 18c438bdf0be8ad98f968bb77b327d7a3f17a3f5 (diff) | |
download | hdf5-d93c6fae4313c497ca1383d1aef24203a29b5087.zip hdf5-d93c6fae4313c497ca1383d1aef24203a29b5087.tar.gz hdf5-d93c6fae4313c497ca1383d1aef24203a29b5087.tar.bz2 |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 36 | ||||
-rw-r--r-- | src/H5private.h | 81 | ||||
-rw-r--r-- | src/libhdf5.settings.in | 1 |
3 files changed, 4 insertions, 114 deletions
@@ -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_<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 * 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@ |