Skip to content

Commit cbb200d

Browse files
authored
Merge pull request #13086 from hppritcha/mpi_t_events_stub
MPI_T: provide a stub implementation of events
2 parents b79b3e9 + d0037fc commit cbb200d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1795
-3
lines changed

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ AC_MSG_CHECKING([for bootstrap Libtool version])
189189
ltversion=`grep VERSION= $srcdir/config/ltmain.sh | head -n 1 | cut -d= -f2`
190190
AC_MSG_RESULT([$ltversion])
191191

192+
# Ensure mpi.h.in and mca_base_event.h have consistent callback safety values
193+
AC_DEFINE_UNQUOTED([OPAL_MCA_BASE_CB_REQUIRE_NONE], [0], [Keeping OPAL and OMPI values in sync])
194+
AC_DEFINE_UNQUOTED([OPAL_MCA_BASE_CB_REQUIRE_MPI_RESTRICTED], [1], [Keeping OPAL and OMPI values in sync])
195+
AC_DEFINE_UNQUOTED([OPAL_MCA_BASE_CB_REQUIRE_THREAD_SAFE], [2], [Keeping OPAL and OMPI values in sync])
196+
AC_DEFINE_UNQUOTED([OPAL_MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE], [3], [Keeping OPAL and OMPI values in sync])
197+
192198
# List header files to generate
193199

194200
AC_CONFIG_HEADERS([opal/include/opal_config.h])
@@ -1399,6 +1405,7 @@ if test $ac_cv_header_sys_synch_h = yes ; then
13991405
[Do not use outside of mpi.h. Define to 1 if you have the <sys/synch.h> header file.])
14001406
fi
14011407
1408+
14021409
# If there is a local hook for each project, call it. This allows 3rd
14031410
# parties to add configuration steps to OPAL and/or OMPI simply
14041411
# by placing a file in [opal|ompi]/config/whatever.m4 that

docs/Makefile.am

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,21 @@ OMPI_MAN3 = \
437437
MPI_T_cvar_write.3 \
438438
MPI_T_enum_get_info.3 \
439439
MPI_T_enum_get_item.3 \
440+
MPI_T_event_callback_get_info.3 \
441+
MPI_T_event_callback_set_info.3 \
442+
MPI_T_event_copy.3 \
443+
MPI_T_event_get_index.3 \
444+
MPI_T_event_get_info.3 \
445+
MPI_T_event_get_num.3 \
446+
MPI_T_event_get_source.3 \
447+
MPI_T_event_get_timestamp.3 \
448+
MPI_T_event_handle_alloc.3 \
449+
MPI_T_event_handle_free.3 \
450+
MPI_T_event_handle_get_info.3 \
451+
MPI_T_event_handle_set_info.3 \
452+
MPI_T_event_read.3 \
453+
MPI_T_event_register_callback.3 \
454+
MPI_T_event_set_dropped_handler.3 \
440455
MPI_Test.3 \
441456
MPI_Testall.3 \
442457
MPI_Testany.3 \
@@ -457,6 +472,9 @@ OMPI_MAN3 = \
457472
MPI_T_pvar_start.3 \
458473
MPI_T_pvar_stop.3 \
459474
MPI_T_pvar_write.3 \
475+
MPI_T_source_get_info.3 \
476+
MPI_T_source_get_num.3 \
477+
MPI_T_source_get_timestamp.3 \
460478
MPI_Type_c2f.3 \
461479
MPI_Type_commit.3 \
462480
MPI_Type_contiguous.3 \

docs/man-openmpi/man3/MPI_T.3.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,49 @@ Open MPI's MPI_T categories are organized hierarchically:
123123

124124

125125
.. seealso::
126+
* :ref:`MPI_T_category_changed`
127+
* :ref:`MPI_T_category_get_categories`
128+
* :ref:`MPI_T_category_get_cvars`
129+
* :ref:`MPI_T_category_get_info`
130+
* :ref:`MPI_T_category_get_num`
131+
* :ref:`MPI_T_category_get_pvars`
132+
* :ref:`MPI_T_cvar_get_info`
133+
* :ref:`MPI_T_cvar_get_num`
134+
* :ref:`MPI_T_cvar_handle_alloc`
135+
* :ref:`MPI_T_cvar_handle_free`
136+
* :ref:`MPI_T_cvar_read`
137+
* :ref:`MPI_T_cvar_write`
138+
* :ref:`MPI_T_enum_get_info`
139+
* :ref:`MPI_T_enum_get_item`
140+
* :ref:`MPI_T_event_callback_get_info`
141+
* :ref:`MPI_T_event_callback_set_info`
142+
* :ref:`MPI_T_event_copy`
143+
* :ref:`MPI_T_event_get_index`
144+
* :ref:`MPI_T_event_get_info`
145+
* :ref:`MPI_T_event_get_num`
146+
* :ref:`MPI_T_event_get_source`
147+
* :ref:`MPI_T_event_get_timestamp`
148+
* :ref:`MPI_T_event_handle_alloc`
149+
* :ref:`MPI_T_event_handle_free`
150+
* :ref:`MPI_T_event_handle_get_info`
151+
* :ref:`MPI_T_event_handle_set_info`
152+
* :ref:`MPI_T_event_read`
153+
* :ref:`MPI_T_event_register_callback`
154+
* :ref:`MPI_T_event_set_dropped_handler`
155+
* :ref:`MPI_T_finalize`
126156
* :ref:`MPI_T_init_thread`
157+
* :ref:`MPI_T_pvar_get_info`
158+
* :ref:`MPI_T_pvar_get_num`
159+
* :ref:`MPI_T_pvar_handle_alloc`
160+
* :ref:`MPI_T_pvar_handle_free`
161+
* :ref:`MPI_T_pvar_read`
162+
* :ref:`MPI_T_pvar_readreset`
163+
* :ref:`MPI_T_pvar_reset`
164+
* :ref:`MPI_T_pvar_session_create`
165+
* :ref:`MPI_T_pvar_session_free`
166+
* :ref:`MPI_T_pvar_start`
167+
* :ref:`MPI_T_pvar_stop`
168+
* :ref:`MPI_T_pvar_write`
169+
* :ref:`MPI_T_source_get_info`
170+
* :ref:`MPI_T_source_get_num`
171+
* :ref:`MPI_T_source_get_timestamp`
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* ``MPI_T_ERR_NOT_INITIALIZED``: The MPI Tools interface is not initialized.
2+
3+
* ``MPI_T_ERR_INVALID_HANDLE``: The handle is invalid.
4+
5+
* ``MPI_T_ERR_INVALID_HANDLE``: Invalid use of the interface or bad parameter values(s).
6+
7+
* ``MPI_T_ERR_OTHER``: Other error
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.. _mpi_t_event_callback_get_info:
2+
3+
4+
MPI_T_event_callback_get_info
5+
=============================
6+
7+
.. include_body
8+
9+
:ref:`MPI_T_event_callback_get_info` |mdash| Returns a new info object containing the hints of the callback function registered for the callback safety level specified by cb_safety of the event-registration handle associated with event_registration.
10+
11+
SYNTAX
12+
------
13+
14+
15+
C Syntax
16+
^^^^^^^^
17+
18+
.. code-block:: c
19+
20+
#include <mpi.h>
21+
22+
int MPI_T_event_callback_get_info(MPI_T_event_registration event_registration,
23+
MPI_T_cb_safety cb_safety, MPI_Info *info_used)
24+
25+
26+
INPUT PARAMETERS
27+
----------------
28+
* ``event_registration``: Event registration
29+
* ``cb_safety``: maximum callback safety level
30+
31+
OUTPUT PARAMETERS
32+
-----------------
33+
34+
* ``info_used``: Info argument
35+
36+
DESCRIPTION
37+
-----------
38+
39+
:ref:`MPI_T_event_callback_get_info` returns a new info object containing the
40+
hints of the callback function registered for the callback safety level specified by ``cb_safety`` of
41+
the event-registration handle associated with ``event_registration``.
42+
43+
44+
ERRORS
45+
------
46+
47+
:ref:`MPI_T_event_callback_get_info` will fail if:
48+
49+
.. include:: ./MPI_T_ERRORS.rst
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. _mpi_t_event_callback_set_info:
2+
3+
4+
MPI_T_event_callback_set_info
5+
=============================
6+
7+
.. include_body
8+
9+
:ref:`MPI_T_event_callback_set_info` |mdash| Updates the hints of the callback function registered for the callback safety level specified by cb_safety of the event-registration handle associated with event_registration.
10+
11+
SYNTAX
12+
------
13+
14+
15+
C Syntax
16+
^^^^^^^^
17+
18+
.. code-block:: c
19+
20+
#include <mpi.h>
21+
22+
int MPI_T_event_callback_set_info(MPI_T_event_registration event_registration,
23+
MPI_T_cb_safety cb_safety, MPI_Info info)
24+
25+
26+
INPUT PARAMETERS
27+
----------------
28+
* ``event_registration``: Event registration
29+
* ``cb_safety``: maximum callback safety level
30+
* ``info``: Info argument
31+
32+
DESCRIPTION
33+
-----------
34+
35+
:ref:`MPI_T_event_callback_set_info` Updates the hints of the callback function registered for the callback safety level specified by ``cb_safety`` of the event-registration handle associated with event_registration.
36+
37+
38+
ERRORS
39+
------
40+
41+
:ref:`MPI_T_event_callback_set_info` will fail if:
42+
43+
.. include:: ./MPI_T_ERRORS.rst
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. _mpi_t_event_copy:
2+
3+
4+
MPI_T_event_copy
5+
================
6+
7+
.. include_body
8+
9+
:ref:`MPI_T_event_copy` |mdash| Copy event data as a whole into a user-specified buffer.
10+
11+
12+
SYNTAX
13+
------
14+
15+
16+
C Syntax
17+
^^^^^^^^
18+
19+
.. code-block:: c
20+
21+
#include <mpi.h>
22+
23+
int MPI_T_event_copy(MPI_T_event_instance event_instance, void *buffer)
24+
25+
26+
INPUT PARAMETERS
27+
----------------
28+
* ``event_instance``: event-instance handle provided to the callback function.
29+
* ``buf``: pointer to a memory location to store the event data.
30+
31+
DESCRIPTION
32+
-----------
33+
34+
:ref:`MPI_T_event_copy` copies the event data as a whole into the user-provided buffer.
35+
The user must assure that the buffer is of at least the size of the extent of the event
36+
type, which can be computed from the type and displacement information returned by the
37+
corresponding call to :ref:`MPI_T_event_get_info`.
38+
39+
ERRORS
40+
------
41+
42+
:ref:`MPI_T_event_copy` will fail if:
43+
44+
.. include:: ./MPI_T_ERRORS.rst
45+
46+
.. seealso::
47+
* :ref:`MPI_T_event_read`
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _mpi_t_event_get_index:
2+
3+
4+
MPI_T_event_get_index
5+
=====================
6+
7+
.. include_body
8+
9+
:ref:`MPI_T_event_get_index` |mdash| Query the index of an event type identified by a known event type name
10+
11+
12+
SYNTAX
13+
------
14+
15+
16+
C Syntax
17+
^^^^^^^^
18+
19+
.. code-block:: c
20+
21+
#include <mpi.h>
22+
23+
int MPI_T_event_get_index(const char *name, int *event_index)
24+
25+
26+
INPUT PARAMETERS
27+
-----------------
28+
29+
* ``name``: name of the event type
30+
31+
OUTPUT PARAMETERS
32+
-----------------
33+
34+
* ``event_index``: index of the event type
35+
36+
37+
DESCRIPTION
38+
-----------
39+
40+
:ref:`MPI_T_event_get_index` can be used to query for the index of an event type identified by a known
41+
event type name.
42+
43+
ERRORS
44+
------
45+
46+
:ref:`MPI_T_event_get_index` will fail if:
47+
48+
* ``MPI_T_ERR_NOT_INITIALIZED``: The MPI Tools interface is not
49+
initialized
50+
51+
* ``MPI_T_ERR_INVALID_NAME``: The event name is invalid
52+
initialized
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. _mpi_t_event_get_info:
2+
3+
4+
MPI_T_event_get_info
5+
====================
6+
7+
.. include_body
8+
9+
:ref:`MPI_T_event_get_info` |mdash| Returns additional information about a specific event type
10+
11+
12+
SYNTAX
13+
------
14+
15+
16+
C Syntax
17+
^^^^^^^^
18+
19+
.. code-block:: c
20+
21+
#include <mpi.h>
22+
23+
int MPI_T_event_get_info(int event_index, char *name, int *name_len,
24+
int *verbosity, MPI_Datatype array_of_datatypes[],
25+
MPI_Aint array_of_displacements[], int *num_elements,
26+
MPI_T_enum *enumtype, MPI_Info *info, char *desc,
27+
int *desc_len, int *bind)
28+
29+
INPUT PARAMETERS
30+
----------------
31+
* ``event_index``: Index of the event to be queried.
32+
33+
INPUT/OUTPUT PARAMETERS
34+
-----------------------
35+
* ``name_len``: Length of the string and/or buffer for name.
36+
* ``desc_len``: Length of the string and/or buffer for desc.
37+
* ``num_elements``: length of array of datatypes and displacements.
38+
39+
OUTPUT PARAMETERS
40+
-----------------
41+
* ``name``: Buffer to return the string containing the name of the event type.
42+
* ``verbosity``: Verbosity level of this event type
43+
* ``array_of_datatypes``: Array of MPI basic datatypes used to encode the event data
44+
* ``array_of_displacements``: Array of byte displacements of the elements in the event buffer
45+
* ``enumtype``: Optional descriptor for enumeration information
46+
* ``info``: Optional info argument.
47+
* ``desc``: Buffer to return the string containing the description of the event type.
48+
* ``bind``: Type of MPI object to which an event of this type must be bound
49+
50+
DESCRIPTION
51+
-----------
52+
53+
:ref:`MPI_T_event_get_info` can be used to query information from for a specific event type.
54+
55+
56+
ERRORS
57+
------
58+
59+
:ref:`MPI_T_event_get_info` will fail if:
60+
61+
* ``MPI_T_ERR_NOT_INITIALIZED``: The MPI Tools interface not initialized
62+
63+
* ``MPI_T_ERR_INVALID_INDEX``: The source index is invalid
64+
65+
* ``MPI_T_ERR_INVALID``: Invalid use of the interface or bad parameter values(s).
66+
67+
* ``MPI_ERR_OTHER``: Other error

0 commit comments

Comments
 (0)