File: MPI_Comm_create_from_group.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 (100 lines) | stat: -rw-r--r-- 3,070 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
.. _mpi_comm_create_from_group:

MPI_Comm_create_from_group
==========================

.. include_body

:ref:`MPI_Comm_create_from_group` |mdash| Creates a new communicator from a group and
stringtag

SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: C

   #include <mpi.h>

   int MPI_Comm_create_from_group(MPI_Group group, const char *stringtag, MPI_Info info, MPI_Errhandler errhandler, MPI_Comm *newcomm)

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

.. code-block:: Fortran

   USE MPI
   ! or the older form: INCLUDE 'mpif.h'

   MPI_COMM_CREATE_FROM_GROUP(GROUP, STRINGTAG, INFO, ERRHANDLER, NEWCOMM, IERROR)
       INTEGER GROUP, INFO, ERRHANDLER, NEWCOMM, IERROR
       CHARACTER*(*) STRINGTAG

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

.. code-block:: Fortran

   USE mpi_f08

   MPI_Comm_create_from_group(group, stringtag, info, errhandler, newcomm, ierror)
       TYPE(MPI_Group), INTENT(IN) :: group
       CHARACTER(LEN=*), INTENT(IN) :: stringtag
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Errhandler), INTENT(IN) :: errhandler
       TYPE(MPI_Comm), INTENT(OUT) :: newcomm
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

INPUT PARAMETERS
----------------

* ``group`` : Group (handler)
* ``stringtag`` : Unique identifier for this operation (string)
* ``info`` : info object (handler)
* ``errhandler`` : error handler to be attached to the new
   intra-communicator (handle)

OUTPUT PARAMETERS
-----------------

* ``newcomm`` : New communicator (handle).
* ``ierror`` : Fortran only: Error status (integer).

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

:ref:`MPI_Comm_create_from_group` is similar to :ref:`MPI_Comm_create_group`, except
that the set of MPI processes involved in the creation of the new
intra-communicator is specified by a group argument, rather than the
group associated with a pre-existing communicator. If a non-empty group
is specified, then all MPI processes in that group must call the
function and each of these MPI processes must provide the same
arguments, including a group that contains the same members with the
same ordering, and identical stringtag value. In the event that
MPI_GROUP_EMPTY is supplied as the group argument, then the call is a
local operation and MPI_COMM_NULL is returned as newcomm. The stringtag
argument is analogous to the tag used for :ref:`MPI_Comm_create_group`. If
multiple threads at a given MPI process perform concurrent
:ref:`MPI_Comm_create_from_group` operations, the user must distinguish these
operations by providing different stringtag arguments. The stringtag
shall not exceed MPI_MAX_STRINGTAG_LEN characters in length. For C, this
includes space for a null terminating character.

NOTES
-----

The errhandler argument specifies an error handler to be attached to the
new intracommunicator. The info argument provides hints and assertions,
possibly MPI implementation dependent, which indicate desired
characteristics and guide communicator creation. MPI_MAX_STRINGTAG_LEN
shall have a value of at least 63.

ERRORS
------

.. include:: ./ERRORS.rst

.. seealso::
   * :ref:`MPI_Comm_create_group`