Skip to content

Commit c04dc35

Browse files
committed
mpi/man: convert MPI_Status conversion man pages to Markdown
Convert the MPI_Status_f082f, MPI_Status_f082c, and MPI_Status_f2c man pages to Markdown. Fix some typos and improve the text a bit along the way. Left the raw NROFF redirect pages MPI_Status_f2f08, MPI_Status_c2f08, and MPI_Status_c2f files as they were -- they're 1-line redirects, and it seems simpler to leave those (vs. duplicating the Markdown). Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent e97d3ce commit c04dc35

File tree

7 files changed

+211
-120
lines changed

7 files changed

+211
-120
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# NAME
2+
3+
MPI_Status_f082c, MPI_Status_c2f08 - Translates a C status into a Fortran 2008 status, or vice versa.
4+
5+
# SYNTAX
6+
7+
## C Syntax
8+
9+
```c
10+
#include <mpi.h>
11+
12+
int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status)
13+
int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status)
14+
```
15+
16+
# PARAMETERS
17+
18+
* `f08_status`: `mpi_f08`-style MPI status object
19+
* `c_status`: C-style MPI status object
20+
21+
# DESCRIPTION
22+
23+
These two procedures are provided in C to convert from a Fortran 2008
24+
status (which is a derived type made of integers) to a C status (which
25+
is a structure), and vice versa. The conversion occurs on all the
26+
information in `status`, including that which is hidden. That is,
27+
no status information is lost in the conversion.
28+
29+
When using `MPI_Status_f082c()`, if `f08_status` is a valid Fortran
30+
status, but not the Fortran value of `MPI_F08_STATUS_IGNORE` or
31+
`MPI_F08_STATUSES_IGNORE`, then `MPI_Status_f082c()` returns in
32+
`c_status` a valid C status with the same content. If `f08_status` is
33+
the Fortran value of `MPI_STATUS_IGNORE` or `MPI_STATUSES_IGNORE`, or
34+
if `f08_status` is not a valid Fortran status, then the call is
35+
erroneous.
36+
37+
When using `MPI_Status_c2f08()`, the opposite conversion is applied. If
38+
`c_status` is `MPI_STATUS_IGNORE` or `MPI_STATUSES_IGNORE`, or if
39+
`c_status` is not a valid C status, then the call is erroneous.
40+
41+
The input status has the same source, tag and error code values as the
42+
output status, and returns the same answers when queried for count,
43+
elements, and cancellation. The conversion function may be called with
44+
an input status argument that has an undefined error field, in which
45+
case the value of the error field in the output status argument is
46+
undefined.
47+
48+
# NOTES
49+
50+
These functions are only available in C; they are not available in any
51+
of the Fortran MPI interfaces.
52+
53+
# SEE ALSO
54+
55+
[`MPI_Status_c2f`(3)](MPI_Status_c2f.html),
56+
[`MPI_Status_f2c`(3)](MPI_Status_f2c.html),
57+
[`MPI_Status_f082f`(3)](MPI_Status_f082f.html),
58+
[`MPI_Status_f2f08`(3)](MPI_Status_f2f08.html)

ompi/mpi/man/man3/MPI_Status_f082c.3in

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# NAME
2+
3+
MPI_Status_f082f, MPI_Status_c2f08 - Translates a Fortran 2008 status into a Fortran INTEGER-style status, or vice versa.
4+
5+
# SYNTAX
6+
7+
## C Syntax
8+
9+
```c
10+
#include <mpi.h>
11+
12+
int MPI_Status_f082f(const MPI_F08_status *f08_status, MPI_Fint *f_status)
13+
int MPI_Status_f2f08(const MPI_Fint *f_status, MPI_F08_status *f08_status)
14+
```
15+
16+
## Fortran mpi Module Syntax
17+
18+
```fortran
19+
USE MPI
20+
21+
MPI_STATUS_F082F(F08_STATUS, F_STATUS, IERROR)
22+
TYPE(MPI_Status) :: F08_STATUS
23+
INTEGER :: STATUS(MPI_STATUS_SIZE), IERROR
24+
25+
MPI_STATUS_F2F08(F_STATUS, F08_STATUS, IERROR)
26+
INTEGER :: F_STATUS(MPI_STATUS_SIZE), IERROR
27+
TYPE(MPI_Status) :: F08_STATUS
28+
```
29+
30+
## Fortran mpi_f08 Module Syntax
31+
32+
```fortran
33+
USE mpi_f08
34+
35+
MPI_Status_f082f(f08_status, f_status, ierror)
36+
TYPE(MPI_Status), INTENT(IN) :: f08_status
37+
INTEGER, INTENT(OUT) :: f_status(MPI_STATUS_SIZE)
38+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
39+
40+
MPI_Status_f2f08(f_status, f08_status, ierror)
41+
INTEGER, INTENT(IN) :: f_status(MPI_STATUS_SIZE)
42+
TYPE(MPI_Status), INTENT(OUT) :: f08_status
43+
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
44+
```
45+
46+
# PARAMETERS
47+
48+
* `f08_status`: `mpi_f08`-style MPI status object
49+
* `f_status`: `mpi`-style `INTEGER` MPI status object
50+
51+
# DESCRIPTION
52+
53+
These two procedures are provided to convert from a Fortran 2008
54+
status (which is a derived datatype made of integers) to a Fortran
55+
status (which is an array of integers), and vice versa. The conversion
56+
occurs on all the information in `status`, including that which is
57+
hidden. That is, no status information is lost in the conversion.
58+
59+
When using `MPI_Status_f082f()`, if `f08_status` is a valid Fortran
60+
status, but not the Fortran value of `MPI_F08_STATUS_IGNORE` (in C),
61+
`MPI_STATUS_IGNORE` (in Fortran) or `MPI_F08_STATUSES_IGNORE` (in C)
62+
or `MPI_STATUSES_IGNORE` (in Fortran), then `MPI_Status_f082f()`
63+
returns in `f_status` a valid array with the same content. If
64+
`f08_status` is the C value of `MPI_F08_STATUS_IGNORE` or
65+
`MPI_F08_STATUSES_IGNORE` or the Fortran value of `MPI_STATUS_IGNORE`
66+
or `MPI_STATUSES_IGNORE`, or if `f08_status` is not a valid Fortran
67+
status, then the call is erroneous.
68+
69+
When using `MPI_Status_f2f08()`, the opposite conversion is
70+
applied. If `f_status` is `MPI_STATUS_IGNORE` or
71+
`MPI_STATUSES_IGNORE`, or if `f_status` is not a valid Fortran status,
72+
then the call is erroneous.
73+
74+
The input status has the same source, tag and error code values as the
75+
output status, and returns the same answers when queried for count,
76+
elements, and cancellation. The conversion function may be called with
77+
an input status argument that has an undefined error field, in which
78+
case the value of the error field in the output status argument is
79+
undefined.
80+
81+
# NOTES
82+
83+
The Fortran subroutines for these MPI routines are only available in
84+
the `mpi` and `mpi_f08` modules (including the type specification for
85+
`TYPE(MPI_Status); they are (intentionally) not available in `mpif.h`.
86+
87+
# SEE ALSO
88+
89+
[`MPI_Status_c2f`(3)](MPI_Status_c2f.html),
90+
[`MPI_Status_f2c`(3)](MPI_Status_c2f.html),
91+
[`MPI_Status_f082c`(3)](MPI_Status_f082c.html),
92+
[`MPI_Status_c2f08`(3)](MPI_Status_c2f08.html)

ompi/mpi/man/man3/MPI_Status_f082f.3in

Lines changed: 0 additions & 56 deletions
This file was deleted.

ompi/mpi/man/man3/MPI_Status_f2c.3.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# NAME
2+
3+
MPI_Status_f2c, MPI_Status_f2c - Translates a C status into a Fortran INTEGER-style status, or vice versa.
4+
5+
# SYNTAX
6+
7+
## C Syntax
8+
9+
```c
10+
#include <mpi.h>
11+
12+
int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status)
13+
int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status)
14+
```
15+
16+
# PARAMETERS
17+
18+
* `f_status`: `mpi`-style `INTEGER` MPI status object
19+
* `c_status`: C-style MPI status object
20+
21+
# DESCRIPTION
22+
23+
These two procedures are provided in C to convert from a Fortran
24+
status (which is an array of integers) to a C status (which is a
25+
structure), and vice versa. The conversion occurs on all the
26+
information in `status`, including that which is hidden. That is,
27+
no status information is lost in the conversion.
28+
29+
When using `MPI_Status_f2c()`, if `f_status` is a valid Fortran
30+
status, but not the Fortran value of `MPI_STATUS_IGNORE` or
31+
`MPI_STATUSES_IGNORE`, then `MPI_Status_f2c()` returns in `c_status` a
32+
valid C status with the same content. If `f_status` is the Fortran
33+
value of `MPI_STATUS_IGNORE` or `MPI_STATUSES_IGNORE`, or if
34+
`f_status` is not a valid Fortran status, then the call is erroneous.
35+
36+
When using `MPI_Status_c2f()`, the opposite conversion is applied. If
37+
`c_status` is `MPI_STATUS_IGNORE` or `MPI_STATUSES_IGNORE`, or if
38+
`c_status` is not a valid C status, then the call is erroneous.
39+
40+
The input status has the same source, tag and error code values as the
41+
output status, and returns the same answers when queried for count,
42+
elements, and cancellation. The conversion function may be called with
43+
an input status argument that has an undefined error field, in which
44+
case the value of the error field in the output status argument is
45+
undefined.
46+
47+
# NOTES
48+
49+
These functions are only available in C; they are not available in any
50+
of the Fortran MPI interfaces.
51+
52+
# SEE ALSO
53+
54+
[`MPI_Status_f082c`(3)](MPI_Status_f082c.html),
55+
[`MPI_Status_c2f08`(3)](MPI_Status_c2f08.html),
56+
[`MPI_Status_f082f`(3)](MPI_Status_f082f.html),
57+
[`MPI_Status_f2f08`(3)](MPI_Status_f2f08.html)

ompi/mpi/man/man3/MPI_Status_f2c.3in

Lines changed: 0 additions & 30 deletions
This file was deleted.

ompi/mpi/man/man3/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ include $(top_srcdir)/Makefile.ompi-rules
2424
# https://rmarkdown.rstudio.com/authoring_pandoc_markdown.html
2525

2626
MD_FILES = \
27-
MPI_T_init_thread.3.md
27+
MPI_T_init_thread.3.md \
28+
MPI_Status_f2c.3.md \
29+
MPI_Status_f082c.3.md \
30+
MPI_Status_f082f.3.md
2831

2932
TEMPLATE_FILES = \
3033
MPI_Abort.3in \
@@ -315,9 +318,6 @@ TEMPLATE_FILES = \
315318
MPI_Startall.3in \
316319
MPI_Status_c2f08.3in \
317320
MPI_Status_c2f.3in \
318-
MPI_Status_f082c.3in \
319-
MPI_Status_f082f.3in \
320-
MPI_Status_f2c.3in \
321321
MPI_Status_f2f08.3in \
322322
MPI_Status_set_cancelled.3in \
323323
MPI_Status_set_elements.3in \

0 commit comments

Comments
 (0)