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