Skip to content

Commit 3d4c7d4

Browse files
authored
Merge pull request #13125 from edgargabriel/topic/mpi4.1-status-set-get-funcs
mpi: add new status_set/get functions
2 parents 8a64826 + 2608b02 commit 3d4c7d4

16 files changed

+790
-0
lines changed

docs/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,15 @@ OMPI_MAN3 = \
419419
MPI_Status_f082f.3 \
420420
MPI_Status_f2c.3 \
421421
MPI_Status_f2f08.3 \
422+
MPI_Status_get_error.3 \
423+
MPI_Status_get_source.3 \
424+
MPI_Status_get_tag.3 \
422425
MPI_Status_set_cancelled.3 \
423426
MPI_Status_set_elements.3 \
424427
MPI_Status_set_elements_x.3 \
428+
MPI_Status_set_error.3 \
429+
MPI_Status_set_source.3 \
430+
MPI_Status_set_tag.3 \
425431
MPI_T.3 \
426432
MPI_T_category_changed.3 \
427433
MPI_T_category_get_categories.3 \
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. _mpi_status_get_error:
2+
3+
4+
MPI_Status_get_error
5+
========================
6+
7+
.. include_body
8+
9+
:ref:`MPI_Status_get_error` |mdash| Retrieves the MPI_ERROR field from *status*.
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_Status_get_error(MPI_Status *status, int *error)
24+
25+
26+
Fortran Syntax
27+
^^^^^^^^^^^^^^
28+
29+
.. code-block:: fortran
30+
31+
USE MPI
32+
! or the older form: INCLUDE 'mpif.h'
33+
MPI_STATUS_GET_ERROR(STATUS, ERROR, IERROR)
34+
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
35+
INTEGER ERROR
36+
37+
38+
Fortran 2008 Syntax
39+
^^^^^^^^^^^^^^^^^^^
40+
41+
.. code-block:: fortran
42+
43+
USE mpi_f08
44+
MPI_Status_get_error(status, error, ierror)
45+
TYPE(MPI_Status), INTENT(IN) :: status
46+
INTEGER, INTENT(OUT) :: error
47+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
48+
49+
INPUT PARAMETER
50+
---------------
51+
* ``status``: Status from which to retrieve the error (status).
52+
53+
OUTPUT PARAMETER
54+
----------------
55+
* ``error``: error set in the MPI_ERROR field (integer).
56+
* ``ierror``: Fortran only: Error status (integer).
57+
58+
DESCRIPTION
59+
-----------
60+
61+
Returns in error the MPI_ERROR field from the status object.
62+
63+
64+
ERRORS
65+
------
66+
67+
.. include:: ./ERRORS.rst
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.. _mpi_status_get_source:
2+
3+
4+
MPI_Status_get_source
5+
========================
6+
7+
.. include_body
8+
9+
:ref:`MPI_Status_get_source` |mdash| Retrieves the MPI_SOURCE field from *status*.
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_Status_get_source(MPI_Status *status, int *source)
24+
25+
26+
Fortran Syntax
27+
^^^^^^^^^^^^^^
28+
29+
.. code-block:: fortran
30+
31+
USE MPI
32+
! or the older form: INCLUDE 'mpif.h'
33+
MPI_STATUS_GET_SOURCE(STATUS, SOURCE, IERROR)
34+
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
35+
INTEGER SOURCE
36+
37+
38+
Fortran 2008 Syntax
39+
^^^^^^^^^^^^^^^^^^^
40+
41+
.. code-block:: fortran
42+
43+
USE mpi_f08
44+
MPI_Status_get_source(status, source, ierror)
45+
TYPE(MPI_Status), INTENT(IN) :: status
46+
INTEGER, INTENT(OUT) :: source
47+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
48+
49+
50+
INPUT PARAMETER
51+
---------------
52+
* ``status``: Status from which to retrieve the source rank (status).
53+
54+
OUTPUT PARAMETER
55+
----------------
56+
* ``source``: rank set in the MPI_SOURCE field (integer).
57+
* ``ierror``: Fortran only: Error status (integer).
58+
59+
DESCRIPTION
60+
-----------
61+
62+
Returns in source the MPI_SOURCE field from the status object.
63+
64+
65+
ERRORS
66+
------
67+
68+
.. include:: ./ERRORS.rst
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.. _mpi_status_get_tag:
2+
3+
4+
MPI_Status_get_tag
5+
========================
6+
7+
.. include_body
8+
9+
:ref:`MPI_Status_get_tag` |mdash| Retrieves the MPI_TAG field from *status*.
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_Status_get_tag(MPI_Status *status, int *tag)
24+
25+
26+
Fortran Syntax
27+
^^^^^^^^^^^^^^
28+
29+
.. code-block:: fortran
30+
31+
USE MPI
32+
! or the older form: INCLUDE 'mpif.h'
33+
MPI_STATUS_GET_TAG(STATUS, TAG, IERROR)
34+
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
35+
INTEGER TAG
36+
37+
38+
Fortran 2008 Syntax
39+
^^^^^^^^^^^^^^^^^^^
40+
41+
.. code-block:: fortran
42+
43+
USE mpi_f08
44+
MPI_Status_get_tag(status, tag, ierror)
45+
TYPE(MPI_Status), INTENT(IN) :: status
46+
INTEGER, INTENT(OUT) :: tag
47+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
48+
49+
50+
INPUT PARAMETER
51+
---------------
52+
* ``status``: Status from which to retrieve the tag (status).
53+
54+
OUTPUT PARAMETER
55+
----------------
56+
* ``tag``: tag set in the MPI_TAG field (integer).
57+
* ``ierror``: Fortran only: Error status (integer).
58+
59+
DESCRIPTION
60+
-----------
61+
62+
Returns in tag the MPI_TAG field from the status object.
63+
64+
65+
ERRORS
66+
------
67+
68+
.. include:: ./ERRORS.rst
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.. _mpi_status_set_error:
2+
3+
4+
MPI_Status_set_error
5+
========================
6+
7+
.. include_body
8+
9+
:ref:`MPI_Status_set_error` |mdash| Sets the MPI_ERROR field on *status*.
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_Status_set_error(MPI_Status *status, int error)
24+
25+
26+
Fortran Syntax
27+
^^^^^^^^^^^^^^
28+
29+
.. code-block:: fortran
30+
31+
USE MPI
32+
! or the older form: INCLUDE 'mpif.h'
33+
MPI_STATUS_SET_ERROR(STATUS, ERROR, IERROR)
34+
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
35+
INTEGER ERROR
36+
37+
38+
Fortran 2008 Syntax
39+
^^^^^^^^^^^^^^^^^^^
40+
41+
.. code-block:: fortran
42+
43+
USE mpi_f08
44+
MPI_Status_set_error(status, error, ierror)
45+
TYPE(MPI_Status), INTENT(INOUT) :: status
46+
INTEGER, INTENT(IN) :: error
47+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
48+
49+
50+
INPUT/OUTPUT PARAMETER
51+
----------------------
52+
* ``status``: Status with which to associate error (status).
53+
54+
INPUT PARAMETER
55+
---------------
56+
* ``error``: error to set in the MPI_ERROR field (integer).
57+
58+
OUTPUT PARAMETER
59+
----------------
60+
* ``ierror``: Fortran only: Error status (integer).
61+
62+
DESCRIPTION
63+
-----------
64+
65+
Set the MPI_ERROR field in the status object to the provided error argument.
66+
67+
68+
ERRORS
69+
------
70+
71+
.. include:: ./ERRORS.rst
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.. _mpi_status_set_source:
2+
3+
4+
MPI_Status_set_source
5+
========================
6+
7+
.. include_body
8+
9+
:ref:`MPI_Status_set_source` |mdash| Sets the MPI_SOURCE field on *status*.
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_Status_set_source(MPI_Status *status, int source)
24+
25+
26+
Fortran Syntax
27+
^^^^^^^^^^^^^^
28+
29+
.. code-block:: fortran
30+
31+
USE MPI
32+
! or the older form: INCLUDE 'mpif.h'
33+
MPI_STATUS_SET_SOURCE(STATUS, SOURCE, IERROR)
34+
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
35+
INTEGER SOURCE
36+
37+
38+
Fortran 2008 Syntax
39+
^^^^^^^^^^^^^^^^^^^
40+
41+
.. code-block:: fortran
42+
43+
USE mpi_f08
44+
MPI_Status_set_source(status, source, ierror)
45+
TYPE(MPI_Status), INTENT(INOUT) :: status
46+
INTEGER, INTENT(IN) :: source
47+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
48+
49+
50+
INPUT/OUTPUT PARAMETER
51+
----------------------
52+
* ``status``: Status with which to associate source rank (status).
53+
54+
INPUT PARAMETER
55+
---------------
56+
* ``source``: rank to set in the MPI_SOURCE field (integer).
57+
58+
OUTPUT PARAMETER
59+
----------------
60+
* ``ierror``: Fortran only: Error status (integer).
61+
62+
DESCRIPTION
63+
-----------
64+
65+
Set the MPI_SOURCE field in the status object to the provided source argument.
66+
67+
68+
ERRORS
69+
------
70+
71+
.. include:: ./ERRORS.rst

0 commit comments

Comments
 (0)