Skip to content

Commit 9e35c26

Browse files
committed
mpi_t events: convert to new profiling approach
Signed-off-by: Howard Pritchard <[email protected]>
1 parent 6cd087d commit 9e35c26

15 files changed

+73
-72
lines changed

ompi/mpi/tool/event_callback_get_info.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* $HEADER$
1515
*/
1616

17+
18+
#include "ompi_config.h"
1719
#include "ompi/mpi/tool/mpit-internal.h"
1820

19-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
21+
#if OMPI_BUILD_MPI_PROFILING
22+
#if OPAL_HAVE_WEAK_SYMBOLS
2023
#pragma weak MPI_T_event_callback_get_info = PMPI_T_event_callback_get_info
2124
#endif
22-
23-
#if OMPI_PROFILING_DEFINES
24-
#include "ompi/mpi/tool/profile/defines.h"
25+
#define MPI_T_event_callback_get_info PMPI_T_event_callback_get_info
2526
#endif
2627

2728

ompi/mpi/tool/event_callback_set_info.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* $HEADER$
1515
*/
1616

17+
#include "ompi_config.h"
18+
1719
#include "ompi/mpi/tool/mpit-internal.h"
1820

19-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
21+
#if OMPI_BUILD_MPI_PROFILING
22+
#if OPAL_HAVE_WEAK_SYMBOLS
2023
#pragma weak MPI_T_event_callback_set_info = PMPI_T_event_callback_set_info
2124
#endif
22-
23-
#if OMPI_PROFILING_DEFINES
24-
#include "ompi/mpi/tool/profile/defines.h"
25+
#define MPI_T_event_callback_set_info PMPI_T_event_callback_set_info
2526
#endif
2627

27-
2828
int MPI_T_event_callback_set_info (MPI_T_event_registration event_registration,
2929
MPI_T_cb_safety cb_safety, MPI_Info info)
3030
{

ompi/mpi/tool/event_copy.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
* $HEADER$
1212
*/
1313

14+
#include "ompi_config.h"
15+
1416
#include "ompi/mpi/tool/mpit-internal.h"
1517

16-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
18+
#if OMPI_BUILD_MPI_PROFILING
19+
#if OPAL_HAVE_WEAK_SYMBOLS
1720
#pragma weak MPI_T_event_copy = PMPI_T_event_copy
1821
#endif
19-
20-
#if OMPI_PROFILING_DEFINES
21-
#include "ompi/mpi/tool/profile/defines.h"
22+
#define MPI_T_event_copy PMPI_T_event_copy
2223
#endif
2324

2425

ompi/mpi/tool/event_get_index.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
* $HEADER$
1111
*/
1212

13+
#include "ompi_config.h"
14+
1315
#include "ompi/mpi/tool/mpit-internal.h"
1416

15-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
17+
#if OMPI_BUILD_MPI_PROFILING
18+
#if OPAL_HAVE_WEAK_SYMBOLS
1619
#pragma weak MPI_T_event_get_index = PMPI_T_event_get_index
1720
#endif
18-
19-
#if OMPI_PROFILING_DEFINES
20-
#include "ompi/mpi/tool/profile/defines.h"
21+
#define MPI_T_event_get_index PMPI_T_event_get_index
2122
#endif
2223

23-
2424
int MPI_T_event_get_index (const char *name, int *event_index)
2525
{
2626
mca_base_event_t *event = NULL;

ompi/mpi/tool/event_get_info.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
* $HEADER$
1414
*/
1515

16+
#include "ompi_config.h"
17+
1618
#include "ompi/mpi/tool/mpit-internal.h"
1719

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

21-
#if OMPI_PROFILING_DEFINES
22-
23+
#if OMPI_BUILD_MPI_PROFILING
2324
#if OPAL_HAVE_WEAK_SYMBOLS
2425
#pragma weak MPI_T_event_get_info = PMPI_T_event_get_info
2526
#endif
26-
27-
#include "ompi/mpi/tool/profile/defines.h"
27+
#define MPI_T_event_get_info PMPI_T_event_get_info
2828
#endif
2929

3030
int MPI_T_event_get_info (int event_index, char *name, int *name_len,

ompi/mpi/tool/event_get_num.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
* $HEADER$
1111
*/
1212

13+
#include "ompi_config.h"
14+
1315
#include "ompi/mpi/tool/mpit-internal.h"
1416

15-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
17+
#if OMPI_BUILD_MPI_PROFILING
18+
#if OPAL_HAVE_WEAK_SYMBOLS
1619
#pragma weak MPI_T_event_get_num = PMPI_T_event_get_num
1720
#endif
18-
19-
#if OMPI_PROFILING_DEFINES
20-
#include "ompi/mpi/tool/profile/defines.h"
21+
#define MPI_T_event_get_num PMPI_T_event_get_num
2122
#endif
2223

23-
2424
int MPI_T_event_get_num (int *num_event)
2525
{
2626
if (!mpit_is_initialized ()) {

ompi/mpi/tool/event_get_source.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
* $HEADER$
1212
*/
1313

14+
#include "ompi_config.h"
15+
1416
#include "ompi/mpi/tool/mpit-internal.h"
1517

16-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
18+
#if OMPI_BUILD_MPI_PROFILING
19+
#if OPAL_HAVE_WEAK_SYMBOLS
1720
#pragma weak MPI_T_event_get_source = PMPI_T_event_get_source
1821
#endif
19-
20-
#if OMPI_PROFILING_DEFINES
21-
#include "ompi/mpi/tool/profile/defines.h"
22+
#define MPI_T_event_get_source PMPI_T_event_get_source
2223
#endif
2324

24-
2525
int MPI_T_event_get_source (MPI_T_event_instance event, int *source_index)
2626
{
2727
if (!mpit_is_initialized ()) {

ompi/mpi/tool/event_get_timestamp.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@
1111
* $HEADER$
1212
*/
1313

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

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

18+
#if OMPI_BUILD_MPI_PROFILING
1819
#if OPAL_HAVE_WEAK_SYMBOLS
1920
#pragma weak MPI_T_event_get_timestamp = PMPI_T_event_get_timestamp
2021
#endif
21-
22-
#include "ompi/mpi/tool/profile/defines.h"
23-
22+
#define MPI_T_event_get_timestamp PMPI_T_event_get_timestamp
2423
#endif
2524

26-
2725
int MPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time)
2826
{
2927
uint64_t mca_time;

ompi/mpi/tool/event_handle_alloc.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
* $HEADER$
1414
*/
1515

16+
#include "ompi_config.h"
17+
1618
#include "ompi/mpi/tool/mpit-internal.h"
1719

18-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
20+
#if OMPI_BUILD_MPI_PROFILING
21+
#if OPAL_HAVE_WEAK_SYMBOLS
1922
#pragma weak MPI_T_event_handle_alloc = PMPI_T_event_handle_alloc
2023
#endif
21-
22-
#if OMPI_PROFILING_DEFINES
23-
#include "ompi/mpi/tool/profile/defines.h"
24+
#define MPI_T_event_handle_alloc PMPI_T_event_handle_alloc
2425
#endif
2526

26-
2727
int MPI_T_event_handle_alloc (int event_index, void *obj_handle, MPI_Info info,
2828
MPI_T_event_registration *event_registration)
2929
{

ompi/mpi/tool/event_handle_free.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
* $HEADER$
1414
*/
1515

16+
#include "ompi_config.h"
17+
1618
#include "ompi/mpi/tool/mpit-internal.h"
1719

18-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
20+
#if OMPI_BUILD_MPI_PROFILING
21+
#if OPAL_HAVE_WEAK_SYMBOLS
1922
#pragma weak MPI_T_event_handle_free = PMPI_T_event_handle_free
2023
#endif
21-
22-
#if OMPI_PROFILING_DEFINES
23-
#include "ompi/mpi/tool/profile/defines.h"
24+
#define MPI_T_event_handle_free PMPI_T_event_handle_free
2425
#endif
2526

26-
2727
int MPI_T_event_handle_free (MPI_T_event_registration event_registration,
2828
void *user_data,
2929
MPI_T_event_free_cb_function free_cb_function)

ompi/mpi/tool/event_handle_get_info.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* $HEADER$
1515
*/
1616

17+
#include "ompi_config.h"
18+
1719
#include "ompi/mpi/tool/mpit-internal.h"
1820

19-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
21+
#if OMPI_BUILD_MPI_PROFILING
22+
#if OPAL_HAVE_WEAK_SYMBOLS
2023
#pragma weak MPI_T_event_handle_get_info = PMPI_T_event_handle_get_info
2124
#endif
22-
23-
#if OMPI_PROFILING_DEFINES
24-
#include "ompi/mpi/tool/profile/defines.h"
25+
#define MPI_T_event_handle_get_info PMPI_T_event_handle_get_info
2526
#endif
2627

27-
2828
int MPI_T_event_handle_get_info (MPI_T_event_registration event_registration,
2929
MPI_Info *info_used)
3030
{

ompi/mpi/tool/event_handle_set_info.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* $HEADER$
1515
*/
1616

17+
#include "ompi_config.h"
18+
1719
#include "ompi/mpi/tool/mpit-internal.h"
1820

19-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
21+
#if OMPI_BUILD_MPI_PROFILING
22+
#if OPAL_HAVE_WEAK_SYMBOLS
2023
#pragma weak MPI_T_event_handle_set_info = PMPI_T_event_handle_set_info
2124
#endif
22-
23-
#if OMPI_PROFILING_DEFINES
24-
#include "ompi/mpi/tool/profile/defines.h"
25+
#define MPI_T_event_handle_set_info PMPI_T_event_handle_set_info
2526
#endif
2627

27-
2828
int MPI_T_event_handle_set_info (MPI_T_event_registration event_registration,
2929
MPI_Info info)
3030
{

ompi/mpi/tool/event_read.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
* $HEADER$
1212
*/
1313

14+
#include "ompi_config.h"
15+
1416
#include "ompi/mpi/tool/mpit-internal.h"
1517

16-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
18+
#if OMPI_BUILD_MPI_PROFILING
19+
#if OPAL_HAVE_WEAK_SYMBOLS
1720
#pragma weak MPI_T_event_read = PMPI_T_event_read
1821
#endif
19-
20-
#if OMPI_PROFILING_DEFINES
21-
#include "ompi/mpi/tool/profile/defines.h"
22+
#define MPI_T_event_read PMPI_T_event_read
2223
#endif
2324

24-
2525
int MPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer)
2626
{
2727
int ret;

ompi/mpi/tool/event_register_callback.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
* $HEADER$
1414
*/
1515

16+
#include "ompi_config.h"
17+
1618
#include "ompi/mpi/tool/mpit-internal.h"
1719

18-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
20+
#if OMPI_BUILD_MPI_PROFILING
21+
#if OPAL_HAVE_WEAK_SYMBOLS
1922
#pragma weak MPI_T_event_register_callback = PMPI_T_event_register_callback
2023
#endif
21-
22-
#if OMPI_PROFILING_DEFINES
23-
#include "ompi/mpi/tool/profile/defines.h"
24+
#define MPI_T_event_register_callback PMPI_T_event_register_callback
2425
#endif
2526

26-
2727
int MPI_T_event_register_callback (MPI_T_event_registration event_registration,
2828
MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data,
2929
MPI_T_event_cb_function event_cb_function)

ompi/mpi/tool/event_set_dropped_handler.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
* $HEADER$
1212
*/
1313

14+
#include "ompi_config.h"
15+
1416
#include "ompi/mpi/tool/mpit-internal.h"
1517

16-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
18+
#if OMPI_BUILD_MPI_PROFILING
19+
#if OPAL_HAVE_WEAK_SYMBOLS
1720
#pragma weak MPI_T_event_set_dropped_handler = PMPI_T_event_set_dropped_handler
1821
#endif
19-
20-
#if OMPI_PROFILING_DEFINES
21-
#include "ompi/mpi/tool/profile/defines.h"
22+
#define MPI_T_event_set_dropped_handler PMPI_T_event_set_dropped_handler
2223
#endif
2324

2425
int MPI_T_event_set_dropped_handler (MPI_T_event_registration handle, MPI_T_event_dropped_cb_function dropped_cb_function)

0 commit comments

Comments
 (0)