|
21 | 21 | * and Technology (RIST). All rights reserved.
|
22 | 22 | * Copyright (c) 2017-2019 IBM Corporation. All rights reserved.
|
23 | 23 | * Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
| 24 | + * Copyright (c) 2018-2019 Triad National Security, LLC. All rights |
| 25 | + * reserved. |
24 | 26 | * $COPYRIGHT$
|
25 | 27 | *
|
26 | 28 | * Additional copyrights may follow
|
@@ -417,6 +419,8 @@ typedef struct mca_base_var_enum_t *MPI_T_enum;
|
417 | 419 | typedef struct ompi_mpit_cvar_handle_t *MPI_T_cvar_handle;
|
418 | 420 | typedef struct mca_base_pvar_handle_t *MPI_T_pvar_handle;
|
419 | 421 | typedef struct mca_base_pvar_session_t *MPI_T_pvar_session;
|
| 422 | +typedef struct mca_base_raised_event_t *MPI_T_event_instance; |
| 423 | +typedef struct mca_base_event_registration_t *MPI_T_event_registration; |
420 | 424 |
|
421 | 425 | /*
|
422 | 426 | * MPI_Status
|
@@ -814,6 +818,41 @@ enum {
|
814 | 818 | MPI_T_PVAR_CLASS_GENERIC
|
815 | 819 | };
|
816 | 820 |
|
| 821 | +/* |
| 822 | + * MPIT callback safety levels |
| 823 | + */ |
| 824 | +typedef enum { |
| 825 | + MPI_T_CB_REQUIRE_NONE, |
| 826 | + MPI_T_CB_REQUIRE_MPI_RESTRICTED, |
| 827 | + MPI_T_CB_REQUIRE_THREAD_SAFE, |
| 828 | + MPI_T_CB_REQUIRE_ASYNC_SIGNAL_SAFE |
| 829 | +} MPI_T_cb_safety; |
| 830 | + |
| 831 | +/* |
| 832 | + * MPIT source ordering |
| 833 | + */ |
| 834 | +enum ompi_mpi_t_order_t { |
| 835 | + MPI_T_ORDERED, |
| 836 | + MPI_T_UNORDERED, |
| 837 | +}; |
| 838 | + |
| 839 | +typedef enum ompi_mpi_t_order_t MPI_T_order; |
| 840 | + |
| 841 | +/* |
| 842 | + * MPI Tool event functions |
| 843 | + */ |
| 844 | +typedef void (*MPI_T_event_free_cb_function) (MPI_T_event_registration handle, |
| 845 | + MPI_T_cb_safety cb_safety, |
| 846 | + void *user_data); |
| 847 | +typedef void (*MPI_T_event_dropped_cb_function) (int count, |
| 848 | + MPI_T_event_registration handle, |
| 849 | + MPI_T_cb_safety cb_safety, |
| 850 | + void *user_data); |
| 851 | +typedef void (*MPI_T_event_cb_function) (MPI_T_event_instance event, |
| 852 | + MPI_T_event_registration handle, |
| 853 | + MPI_T_cb_safety cb_safety, |
| 854 | + void *user_data); |
| 855 | + |
817 | 856 | /*
|
818 | 857 | * NULL handles
|
819 | 858 | */
|
@@ -848,6 +887,7 @@ enum {
|
848 | 887 | #define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle) 0)
|
849 | 888 | #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session) 0)
|
850 | 889 | #define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle) 0)
|
| 890 | +#define MPI_T_EVENT_REGISTRATION_NULL ((MPI_T_event_registration) 0) |
851 | 891 |
|
852 | 892 | /* MPI-2 specifies that the name "MPI_TYPE_NULL_DELETE_FN" (and all
|
853 | 893 | related friends) must be accessible in C, C++, and Fortran. This is
|
@@ -2650,6 +2690,40 @@ OMPI_DECLSPEC int PMPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *nam
|
2650 | 2690 | OMPI_DECLSPEC int PMPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name,
|
2651 | 2691 | int *name_len);
|
2652 | 2692 |
|
| 2693 | +OMPI_DECLSPEC int PMPI_T_event_get_num (int *num_events); |
| 2694 | +OMPI_DECLSPEC int PMPI_T_event_get_info (int event_index, char *name, int *name_len, |
| 2695 | + int *verbosity, MPI_Datatype *array_of_datatypes, |
| 2696 | + MPI_Aint *array_of_displacements, int *num_elements, |
| 2697 | + MPI_Aint *extent, MPI_T_enum *enumtype, MPI_Info *info, |
| 2698 | + char *desc, int *desc_len, int *bind); |
| 2699 | +OMPI_DECLSPEC int PMPI_T_event_get_index (const char *name, int *event_index); |
| 2700 | +OMPI_DECLSPEC int PMPI_T_event_handle_alloc (int event_index, void *obj_handle, |
| 2701 | + MPI_Info info, MPI_T_event_registration *event_registration); |
| 2702 | +OMPI_DECLSPEC int PMPI_T_event_handle_set_info (MPI_T_event_registration event_registration, MPI_Info info); |
| 2703 | +OMPI_DECLSPEC int PMPI_T_event_handle_get_info (MPI_T_event_registration event_registration, |
| 2704 | + MPI_Info *info_used); |
| 2705 | +OMPI_DECLSPEC int PMPI_T_event_register_callback (MPI_T_event_registration event_registration, |
| 2706 | + MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data, |
| 2707 | + MPI_T_event_cb_function event_cb_function); |
| 2708 | +OMPI_DECLSPEC int PMPI_T_event_callback_set_info (MPI_T_event_registration event_registration, |
| 2709 | + MPI_T_cb_safety cb_safety, MPI_Info info); |
| 2710 | +OMPI_DECLSPEC int PMPI_T_event_callback_get_info (MPI_T_event_registration event_registration, |
| 2711 | + MPI_T_cb_safety cb_safety, MPI_Info *info_used); |
| 2712 | +OMPI_DECLSPEC int PMPI_T_event_handle_free (MPI_T_event_registration event_registration, |
| 2713 | + MPI_T_event_free_cb_function free_cb_function); |
| 2714 | +OMPI_DECLSPEC int PMPI_T_event_set_dropped_handler (MPI_T_event_registration handle, |
| 2715 | + MPI_T_event_dropped_cb_function dropped_cb_function); |
| 2716 | +OMPI_DECLSPEC int PMPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer); |
| 2717 | +OMPI_DECLSPEC int PMPI_T_event_copy (MPI_T_event_instance event, void *buffer); |
| 2718 | +OMPI_DECLSPEC int PMPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time); |
| 2719 | +OMPI_DECLSPEC int PMPI_T_event_get_source (MPI_T_event_instance event, int *source_index); |
| 2720 | +OMPI_DECLSPEC int PMPI_T_source_get_num (int *num_source); |
| 2721 | +OMPI_DECLSPEC int PMPI_T_source_get_info (int source_id, char *name, int *name_len, |
| 2722 | + char *desc, int *desc_len, MPI_T_order *ordering, |
| 2723 | + MPI_Count *ticks_per_second, MPI_Count *max_timestamp, |
| 2724 | + MPI_Info *info); |
| 2725 | +OMPI_DECLSPEC int PMPI_T_source_get_timestamp (int source_id, MPI_Count *timestamp); |
| 2726 | + |
2653 | 2727 | /*
|
2654 | 2728 | * Tool MPI API
|
2655 | 2729 | */
|
@@ -2716,6 +2790,41 @@ OMPI_DECLSPEC int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
|
2716 | 2790 | OMPI_DECLSPEC int PMPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
|
2717 | 2791 | __mpi_interface_deprecated__("PMPI_Attr_put was deprecated in MPI-2.0; use PMPI_Comm_set_attr instead");
|
2718 | 2792 |
|
| 2793 | +OMPI_DECLSPEC int MPI_T_event_get_num (int *num_events); |
| 2794 | +OMPI_DECLSPEC int MPI_T_event_get_info (int event_index, char *name, int *name_len, |
| 2795 | + int *verbosity, MPI_Datatype *array_of_datatypes, |
| 2796 | + MPI_Aint *array_of_displacements, int *num_elements, |
| 2797 | + MPI_Aint *extent, MPI_T_enum *enumtype, MPI_Info *info, |
| 2798 | + char *desc, int *desc_len, int *bind); |
| 2799 | +OMPI_DECLSPEC int MPI_T_event_get_index (const char *name, int *event_index); |
| 2800 | +OMPI_DECLSPEC int MPI_T_event_handle_alloc (int event_index, void *obj_handle, |
| 2801 | + MPI_Info info, MPI_T_event_registration *event_registration); |
| 2802 | +OMPI_DECLSPEC int MPI_T_event_handle_set_info (MPI_T_event_registration event_registration, MPI_Info info); |
| 2803 | +OMPI_DECLSPEC int MPI_T_event_handle_get_info (MPI_T_event_registration event_registration, |
| 2804 | + MPI_Info *info_used); |
| 2805 | +OMPI_DECLSPEC int MPI_T_event_handle_free (MPI_T_event_registration event_registration, |
| 2806 | + MPI_T_event_free_cb_function free_cb_function); |
| 2807 | +OMPI_DECLSPEC int MPI_T_event_register_callback (MPI_T_event_registration event_registration, |
| 2808 | + MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data, |
| 2809 | + MPI_T_event_cb_function event_cb_function); |
| 2810 | +OMPI_DECLSPEC int MPI_T_event_callback_set_info (MPI_T_event_registration event_registration, |
| 2811 | + MPI_T_cb_safety cb_safety, MPI_Info info); |
| 2812 | +OMPI_DECLSPEC int MPI_T_event_callback_get_info (MPI_T_event_registration event_registration, |
| 2813 | + MPI_T_cb_safety cb_safety, MPI_Info *info_used); |
| 2814 | +OMPI_DECLSPEC int MPI_T_event_set_dropped_handler (MPI_T_event_registration handle, |
| 2815 | + MPI_T_event_dropped_cb_function dropped_cb_function); |
| 2816 | +OMPI_DECLSPEC int MPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer); |
| 2817 | +OMPI_DECLSPEC int MPI_T_event_copy (MPI_T_event_instance event, void *buffer); |
| 2818 | +OMPI_DECLSPEC int MPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time); |
| 2819 | +OMPI_DECLSPEC int MPI_T_event_get_source (MPI_T_event_instance event, int *source_index); |
| 2820 | + |
| 2821 | +OMPI_DECLSPEC int MPI_T_source_get_num (int *num_source); |
| 2822 | +OMPI_DECLSPEC int MPI_T_source_get_info (int source_id, char *name, int *name_len, |
| 2823 | + char *desc, int *desc_len, MPI_T_order *ordering, |
| 2824 | + MPI_Count *ticks_per_second, MPI_Count *max_timestamp, |
| 2825 | + MPI_Info *info); |
| 2826 | +OMPI_DECLSPEC int MPI_T_source_get_timestamp (int source_id, MPI_Count *timestamp); |
| 2827 | + |
2719 | 2828 | /*
|
2720 | 2829 | * Even though MPI_Copy_function and MPI_Delete_function are
|
2721 | 2830 | * deprecated, we do not use the attributes marking them as such,
|
|
0 commit comments