|
25 | 25 | * Copyright (c) 2021 Amazon.com, Inc. or its affiliates. All Rights
|
26 | 26 | * reserved.
|
27 | 27 | * Copyright (c) 2021 Bull S.A.S. All rights reserved.
|
| 28 | + * Copyright (c) 2018-2019 Triad National Security, LLC. All rights |
| 29 | + * reserved. |
28 | 30 | * $COPYRIGHT$
|
29 | 31 | *
|
30 | 32 | * Additional copyrights may follow
|
@@ -443,6 +445,8 @@ typedef struct mca_base_var_enum_t *MPI_T_enum;
|
443 | 445 | typedef struct ompi_mpit_cvar_handle_t *MPI_T_cvar_handle;
|
444 | 446 | typedef struct mca_base_pvar_handle_t *MPI_T_pvar_handle;
|
445 | 447 | typedef struct mca_base_pvar_session_t *MPI_T_pvar_session;
|
| 448 | +typedef struct mca_base_raised_event_t *MPI_T_event_instance; |
| 449 | +typedef struct mca_base_event_registration_t *MPI_T_event_registration; |
446 | 450 |
|
447 | 451 | /*
|
448 | 452 | * MPI_Status
|
@@ -849,6 +853,41 @@ enum {
|
849 | 853 | MPI_T_PVAR_CLASS_GENERIC
|
850 | 854 | };
|
851 | 855 |
|
| 856 | +/* |
| 857 | + * MPIT callback safety levels |
| 858 | + */ |
| 859 | +typedef enum { |
| 860 | + MPI_T_CB_REQUIRE_NONE, |
| 861 | + MPI_T_CB_REQUIRE_MPI_RESTRICTED, |
| 862 | + MPI_T_CB_REQUIRE_THREAD_SAFE, |
| 863 | + MPI_T_CB_REQUIRE_ASYNC_SIGNAL_SAFE |
| 864 | +} MPI_T_cb_safety; |
| 865 | + |
| 866 | +/* |
| 867 | + * MPIT source ordering |
| 868 | + */ |
| 869 | +enum ompi_mpi_t_order_t { |
| 870 | + MPI_T_ORDERED, |
| 871 | + MPI_T_UNORDERED, |
| 872 | +}; |
| 873 | + |
| 874 | +typedef enum ompi_mpi_t_order_t MPI_T_order; |
| 875 | + |
| 876 | +/* |
| 877 | + * MPI Tool event functions |
| 878 | + */ |
| 879 | +typedef void (*MPI_T_event_free_cb_function) (MPI_T_event_registration handle, |
| 880 | + MPI_T_cb_safety cb_safety, |
| 881 | + void *user_data); |
| 882 | +typedef void (*MPI_T_event_dropped_cb_function) (int count, |
| 883 | + MPI_T_event_registration handle, |
| 884 | + MPI_T_cb_safety cb_safety, |
| 885 | + void *user_data); |
| 886 | +typedef void (*MPI_T_event_cb_function) (MPI_T_event_instance event, |
| 887 | + MPI_T_event_registration handle, |
| 888 | + MPI_T_cb_safety cb_safety, |
| 889 | + void *user_data); |
| 890 | + |
852 | 891 | /*
|
853 | 892 | * NULL handles
|
854 | 893 | */
|
@@ -883,6 +922,7 @@ enum {
|
883 | 922 | #define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle) 0)
|
884 | 923 | #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session) 0)
|
885 | 924 | #define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle) 0)
|
| 925 | +#define MPI_T_EVENT_REGISTRATION_NULL ((MPI_T_event_registration) 0) |
886 | 926 |
|
887 | 927 | /* MPI-2 specifies that the name "MPI_TYPE_NULL_DELETE_FN" (and all
|
888 | 928 | related friends) must be accessible in C, C++, and Fortran. This is
|
@@ -2826,6 +2866,40 @@ OMPI_DECLSPEC int PMPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *nam
|
2826 | 2866 | OMPI_DECLSPEC int PMPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name,
|
2827 | 2867 | int *name_len);
|
2828 | 2868 |
|
| 2869 | +OMPI_DECLSPEC int PMPI_T_event_get_num (int *num_events); |
| 2870 | +OMPI_DECLSPEC int PMPI_T_event_get_info (int event_index, char *name, int *name_len, |
| 2871 | + int *verbosity, MPI_Datatype *array_of_datatypes, |
| 2872 | + MPI_Aint *array_of_displacements, int *num_elements, |
| 2873 | + MPI_Aint *extent, MPI_T_enum *enumtype, MPI_Info *info, |
| 2874 | + char *desc, int *desc_len, int *bind); |
| 2875 | +OMPI_DECLSPEC int PMPI_T_event_get_index (const char *name, int *event_index); |
| 2876 | +OMPI_DECLSPEC int PMPI_T_event_handle_alloc (int event_index, void *obj_handle, |
| 2877 | + MPI_Info info, MPI_T_event_registration *event_registration); |
| 2878 | +OMPI_DECLSPEC int PMPI_T_event_handle_set_info (MPI_T_event_registration event_registration, MPI_Info info); |
| 2879 | +OMPI_DECLSPEC int PMPI_T_event_handle_get_info (MPI_T_event_registration event_registration, |
| 2880 | + MPI_Info *info_used); |
| 2881 | +OMPI_DECLSPEC int PMPI_T_event_register_callback (MPI_T_event_registration event_registration, |
| 2882 | + MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data, |
| 2883 | + MPI_T_event_cb_function event_cb_function); |
| 2884 | +OMPI_DECLSPEC int PMPI_T_event_callback_set_info (MPI_T_event_registration event_registration, |
| 2885 | + MPI_T_cb_safety cb_safety, MPI_Info info); |
| 2886 | +OMPI_DECLSPEC int PMPI_T_event_callback_get_info (MPI_T_event_registration event_registration, |
| 2887 | + MPI_T_cb_safety cb_safety, MPI_Info *info_used); |
| 2888 | +OMPI_DECLSPEC int PMPI_T_event_handle_free (MPI_T_event_registration event_registration, |
| 2889 | + MPI_T_event_free_cb_function free_cb_function); |
| 2890 | +OMPI_DECLSPEC int PMPI_T_event_set_dropped_handler (MPI_T_event_registration handle, |
| 2891 | + MPI_T_event_dropped_cb_function dropped_cb_function); |
| 2892 | +OMPI_DECLSPEC int PMPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer); |
| 2893 | +OMPI_DECLSPEC int PMPI_T_event_copy (MPI_T_event_instance event, void *buffer); |
| 2894 | +OMPI_DECLSPEC int PMPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time); |
| 2895 | +OMPI_DECLSPEC int PMPI_T_event_get_source (MPI_T_event_instance event, int *source_index); |
| 2896 | +OMPI_DECLSPEC int PMPI_T_source_get_num (int *num_source); |
| 2897 | +OMPI_DECLSPEC int PMPI_T_source_get_info (int source_id, char *name, int *name_len, |
| 2898 | + char *desc, int *desc_len, MPI_T_order *ordering, |
| 2899 | + MPI_Count *ticks_per_second, MPI_Count *max_timestamp, |
| 2900 | + MPI_Info *info); |
| 2901 | +OMPI_DECLSPEC int PMPI_T_source_get_timestamp (int source_id, MPI_Count *timestamp); |
| 2902 | + |
2829 | 2903 | /*
|
2830 | 2904 | * Tool MPI API
|
2831 | 2905 | */
|
@@ -2892,6 +2966,41 @@ OMPI_DECLSPEC int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
|
2892 | 2966 | OMPI_DECLSPEC int PMPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
|
2893 | 2967 | __mpi_interface_deprecated__("PMPI_Attr_put was deprecated in MPI-2.0; use PMPI_Comm_set_attr instead");
|
2894 | 2968 |
|
| 2969 | +OMPI_DECLSPEC int MPI_T_event_get_num (int *num_events); |
| 2970 | +OMPI_DECLSPEC int MPI_T_event_get_info (int event_index, char *name, int *name_len, |
| 2971 | + int *verbosity, MPI_Datatype *array_of_datatypes, |
| 2972 | + MPI_Aint *array_of_displacements, int *num_elements, |
| 2973 | + MPI_Aint *extent, MPI_T_enum *enumtype, MPI_Info *info, |
| 2974 | + char *desc, int *desc_len, int *bind); |
| 2975 | +OMPI_DECLSPEC int MPI_T_event_get_index (const char *name, int *event_index); |
| 2976 | +OMPI_DECLSPEC int MPI_T_event_handle_alloc (int event_index, void *obj_handle, |
| 2977 | + MPI_Info info, MPI_T_event_registration *event_registration); |
| 2978 | +OMPI_DECLSPEC int MPI_T_event_handle_set_info (MPI_T_event_registration event_registration, MPI_Info info); |
| 2979 | +OMPI_DECLSPEC int MPI_T_event_handle_get_info (MPI_T_event_registration event_registration, |
| 2980 | + MPI_Info *info_used); |
| 2981 | +OMPI_DECLSPEC int MPI_T_event_handle_free (MPI_T_event_registration event_registration, |
| 2982 | + MPI_T_event_free_cb_function free_cb_function); |
| 2983 | +OMPI_DECLSPEC int MPI_T_event_register_callback (MPI_T_event_registration event_registration, |
| 2984 | + MPI_T_cb_safety cb_safety, MPI_Info info, void *user_data, |
| 2985 | + MPI_T_event_cb_function event_cb_function); |
| 2986 | +OMPI_DECLSPEC int MPI_T_event_callback_set_info (MPI_T_event_registration event_registration, |
| 2987 | + MPI_T_cb_safety cb_safety, MPI_Info info); |
| 2988 | +OMPI_DECLSPEC int MPI_T_event_callback_get_info (MPI_T_event_registration event_registration, |
| 2989 | + MPI_T_cb_safety cb_safety, MPI_Info *info_used); |
| 2990 | +OMPI_DECLSPEC int MPI_T_event_set_dropped_handler (MPI_T_event_registration handle, |
| 2991 | + MPI_T_event_dropped_cb_function dropped_cb_function); |
| 2992 | +OMPI_DECLSPEC int MPI_T_event_read (MPI_T_event_instance event, int element_index, void *buffer); |
| 2993 | +OMPI_DECLSPEC int MPI_T_event_copy (MPI_T_event_instance event, void *buffer); |
| 2994 | +OMPI_DECLSPEC int MPI_T_event_get_timestamp (MPI_T_event_instance event, MPI_Count *event_time); |
| 2995 | +OMPI_DECLSPEC int MPI_T_event_get_source (MPI_T_event_instance event, int *source_index); |
| 2996 | + |
| 2997 | +OMPI_DECLSPEC int MPI_T_source_get_num (int *num_source); |
| 2998 | +OMPI_DECLSPEC int MPI_T_source_get_info (int source_id, char *name, int *name_len, |
| 2999 | + char *desc, int *desc_len, MPI_T_order *ordering, |
| 3000 | + MPI_Count *ticks_per_second, MPI_Count *max_timestamp, |
| 3001 | + MPI_Info *info); |
| 3002 | +OMPI_DECLSPEC int MPI_T_source_get_timestamp (int source_id, MPI_Count *timestamp); |
| 3003 | + |
2895 | 3004 | /*
|
2896 | 3005 | * Even though MPI_Copy_function and MPI_Delete_function are
|
2897 | 3006 | * deprecated, we do not use the attributes marking them as such,
|
|
0 commit comments