File: MPI_Group_range_incl.3.rst

package info (click to toggle)
openmpi 5.0.8-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 201,692 kB
  • sloc: ansic: 613,078; makefile: 42,351; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (111 lines) | stat: -rw-r--r-- 2,849 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.. _mpi_group_range_incl:


MPI_Group_range_incl
====================

.. include_body

:ref:`MPI_Group_range_incl` |mdash| Creates a new group from ranges of ranks in
an existing group.


SYNTAX
------


C Syntax
^^^^^^^^

.. code-block:: c

   #include <mpi.h>

   int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
   	MPI_Group *newgroup)


Fortran Syntax
^^^^^^^^^^^^^^

.. code-block:: fortran

   USE MPI
   ! or the older form: INCLUDE 'mpif.h'
   MPI_GROUP_RANGE_INCL(GROUP, N, RANGES, NEWGROUP, IERROR)
   	INTEGER	GROUP, N, RANGES(3,*), NEWGROUP, IERROR


Fortran 2008 Syntax
^^^^^^^^^^^^^^^^^^^

.. code-block:: fortran

   USE mpi_f08
   MPI_Group_range_incl(group, n, ranges, newgroup, ierror)
   	TYPE(MPI_Group), INTENT(IN) :: group
   	INTEGER, INTENT(IN) :: n, ranges(3,n)
   	TYPE(MPI_Group), INTENT(OUT) :: newgroup
   	INTEGER, OPTIONAL, INTENT(OUT) :: ierror


INPUT PARAMETERS
----------------
* ``group``: Group (handle).
* ``n``: Number of triplets in array ranges (integer).
* ``ranges``: A one-dimensional array of integer triplets, of the form (first rank, last rank, stride) indicating ranks in group or processes to be included in newgroup.

OUTPUT PARAMETERS
-----------------
* ``newgroup``: New group derived from above, in the order defined by ranges (handle).
* ``ierror``: Fortran only: Error status (integer).

DESCRIPTION
-----------

If ranges consist of the triplets

::

       (first1, last1, stride1), ..., (firstn, lastn, striden)

then newgroup consists of the sequence of processes in group with ranks

::

                                                    last(1)-first(1)
     first(1), first(1) + stride(1),..., first(1) + ---------------- stride(1),...
                                                        stride(1)

                                                    last(n)-first(n)
     first(n), first(n) + stride(n),..., first(n) + ---------------- stride(n).
                                                        stride(n)

Each computed rank must be a valid rank in group and all computed ranks
must be distinct, or else the program is erroneous. Note that we may
have first(i) > last(i), and stride(i) may be negative, but cannot be
zero.

The functionality of this routine is specified to be equivalent to
expanding the array of ranges to an array of the included ranks and
passing the resulting array of ranks and other arguments to
:ref:`MPI_Group_incl`. A call to :ref:`MPI_Group_incl` is equivalent to a call to
:ref:`MPI_Group_range_incl` with each rank i in ranks replaced by the triplet
(i,i,1) in the argument ranges.


NOTE
----

This implementation does not currently check to see that the list of
ranges to include are valid ranks in the group.


ERRORS
------

.. include:: ./ERRORS.rst

.. seealso::
   * :ref:`MPI_Group_incl`
   * :ref:`MPI_Group_free`