Skip to content

Commit

Permalink
mpi_t events: convert to new profiling approach
Browse files Browse the repository at this point in the history
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
  • Loading branch information
hppritcha committed Jan 18, 2022
1 parent 6cd087d commit 9e35c26
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 72 deletions.
9 changes: 5 additions & 4 deletions ompi/mpi/tool/event_callback_get_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
* $HEADER$
*/


#include "ompi_config.h"
#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_callback_get_info = PMPI_T_event_callback_get_info
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_callback_get_info PMPI_T_event_callback_get_info
#endif


Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_callback_set_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_callback_set_info = PMPI_T_event_callback_set_info
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_callback_set_info PMPI_T_event_callback_set_info
#endif


int MPI_T_event_callback_set_info (MPI_T_event_registration event_registration,
MPI_T_cb_safety cb_safety, MPI_Info info)
{
Expand Down
9 changes: 5 additions & 4 deletions ompi/mpi/tool/event_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_copy = PMPI_T_event_copy
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_copy PMPI_T_event_copy
#endif


Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_get_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_get_index = PMPI_T_event_get_index
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_get_index PMPI_T_event_get_index
#endif


int MPI_T_event_get_index (const char *name, int *event_index)
{
mca_base_event_t *event = NULL;
Expand Down
8 changes: 4 additions & 4 deletions ompi/mpi/tool/event_get_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

/* needed to convert between opal and ompi datatypes until a function is provided */
#include "ompi/datatype/ompi_datatype_internal.h"

#if OMPI_PROFILING_DEFINES

#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_get_info = PMPI_T_event_get_info
#endif

#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_get_info PMPI_T_event_get_info
#endif

int MPI_T_event_get_info (int event_index, char *name, int *name_len,
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_get_num.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_get_num = PMPI_T_event_get_num
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_get_num PMPI_T_event_get_num
#endif


int MPI_T_event_get_num (int *num_event)
{
if (!mpit_is_initialized ()) {
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_get_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_get_source = PMPI_T_event_get_source
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_get_source PMPI_T_event_get_source
#endif


int MPI_T_event_get_source (MPI_T_event_instance event, int *source_index)
{
if (!mpit_is_initialized ()) {
Expand Down
10 changes: 4 additions & 6 deletions ompi/mpi/tool/event_get_timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@
* $HEADER$
*/

#include "ompi/mpi/tool/mpit-internal.h"
#include "ompi_config.h"

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/mpit-internal.h"

#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_get_timestamp = PMPI_T_event_get_timestamp
#endif

#include "ompi/mpi/tool/profile/defines.h"

#define MPI_T_event_get_timestamp PMPI_T_event_get_timestamp
#endif


int MPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time)
{
uint64_t mca_time;
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_handle_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_handle_alloc = PMPI_T_event_handle_alloc
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_handle_alloc PMPI_T_event_handle_alloc
#endif


int MPI_T_event_handle_alloc (int event_index, void *obj_handle, MPI_Info info,
MPI_T_event_registration *event_registration)
{
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_handle_free.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_handle_free = PMPI_T_event_handle_free
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_handle_free PMPI_T_event_handle_free
#endif


int MPI_T_event_handle_free (MPI_T_event_registration event_registration,
void *user_data,
MPI_T_event_free_cb_function free_cb_function)
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_handle_get_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_handle_get_info = PMPI_T_event_handle_get_info
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_handle_get_info PMPI_T_event_handle_get_info
#endif


int MPI_T_event_handle_get_info (MPI_T_event_registration event_registration,
MPI_Info *info_used)
{
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_handle_set_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_handle_set_info = PMPI_T_event_handle_set_info
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_handle_set_info PMPI_T_event_handle_set_info
#endif


int MPI_T_event_handle_set_info (MPI_T_event_registration event_registration,
MPI_Info info)
{
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_read = PMPI_T_event_read
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_read PMPI_T_event_read
#endif


int MPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer)
{
int ret;
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/tool/event_register_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_register_callback = PMPI_T_event_register_callback
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_register_callback PMPI_T_event_register_callback
#endif


int MPI_T_event_register_callback (MPI_T_event_registration event_registration,
MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data,
MPI_T_event_cb_function event_cb_function)
Expand Down
9 changes: 5 additions & 4 deletions ompi/mpi/tool/event_set_dropped_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/mpi/tool/mpit-internal.h"

#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#if OMPI_BUILD_MPI_PROFILING
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_T_event_set_dropped_handler = PMPI_T_event_set_dropped_handler
#endif

#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/tool/profile/defines.h"
#define MPI_T_event_set_dropped_handler PMPI_T_event_set_dropped_handler
#endif

int MPI_T_event_set_dropped_handler (MPI_T_event_registration handle, MPI_T_event_dropped_cb_function dropped_cb_function)
Expand Down

0 comments on commit 9e35c26

Please sign in to comment.