openmpi  3.1.6
About: Open MPI is a high performance Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library available. 3.x series.
  Fossies Dox: openmpi-3.1.6.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

communicator.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4  * University Research and Technology
5  * Corporation. All rights reserved.
6  * Copyright (c) 2004-2017 The University of Tennessee and The University
7  * of Tennessee Research Foundation. All rights
8  * reserved.
9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10  * University of Stuttgart. All rights reserved.
11  * Copyright (c) 2004-2005 The Regents of the University of California.
12  * All rights reserved.
13  * Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
14  * Copyright (c) 2006-2017 University of Houston. All rights reserved.
15  * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
16  * Copyright (c) 2011-2013 Inria. All rights reserved.
17  * Copyright (c) 2011-2013 Universite Bordeaux 1
18  * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
19  * reserved.
20  * Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
21  * Copyright (c) 2015 Research Organization for Information Science
22  * and Technology (RIST). All rights reserved.
23  * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
24  * $COPYRIGHT$
25  *
26  * Additional copyrights may follow
27  *
28  * $HEADER$
29  */
30 
31 #ifndef OMPI_COMMUNICATOR_H
32 #define OMPI_COMMUNICATOR_H
33 
34 #include "ompi_config.h"
35 #include "opal/class/opal_object.h"
39 #include "opal/threads/mutex.h"
41 
42 #include "mpi.h"
43 #include "ompi/group/group.h"
44 #include "ompi/mca/coll/coll.h"
45 #include "ompi/info/info.h"
46 #include "ompi/proc/proc.h"
47 
49 
51 
52 #define OMPI_COMM_INTER 0x00000001
53 #define OMPI_COMM_NAMEISSET 0x00000002
54 #define OMPI_COMM_INTRINSIC 0x00000004
55 #define OMPI_COMM_DYNAMIC 0x00000008
56 #define OMPI_COMM_ISFREED 0x00000010
57 #define OMPI_COMM_INVALID 0x00000020
58 #define OMPI_COMM_CART 0x00000100
59 #define OMPI_COMM_GRAPH 0x00000200
60 #define OMPI_COMM_DIST_GRAPH 0x00000400
61 #define OMPI_COMM_PML_ADDED 0x00001000
62 #define OMPI_COMM_EXTRA_RETAIN 0x00004000
63 #define OMPI_COMM_MAPBY_NODE 0x00008000
64 
65 /* some utility #defines */
66 #define OMPI_COMM_IS_INTER(comm) ((comm)->c_flags & OMPI_COMM_INTER)
67 #define OMPI_COMM_IS_INTRA(comm) (!((comm)->c_flags & OMPI_COMM_INTER))
68 #define OMPI_COMM_IS_CART(comm) ((comm)->c_flags & OMPI_COMM_CART)
69 #define OMPI_COMM_IS_GRAPH(comm) ((comm)->c_flags & OMPI_COMM_GRAPH)
70 #define OMPI_COMM_IS_DIST_GRAPH(comm) ((comm)->c_flags & OMPI_COMM_DIST_GRAPH)
71 #define OMPI_COMM_IS_INTRINSIC(comm) ((comm)->c_flags & OMPI_COMM_INTRINSIC)
72 #define OMPI_COMM_IS_FREED(comm) ((comm)->c_flags & OMPI_COMM_ISFREED)
73 #define OMPI_COMM_IS_DYNAMIC(comm) ((comm)->c_flags & OMPI_COMM_DYNAMIC)
74 #define OMPI_COMM_IS_INVALID(comm) ((comm)->c_flags & OMPI_COMM_INVALID)
75 #define OMPI_COMM_IS_PML_ADDED(comm) ((comm)->c_flags & OMPI_COMM_PML_ADDED)
76 #define OMPI_COMM_IS_EXTRA_RETAIN(comm) ((comm)->c_flags & OMPI_COMM_EXTRA_RETAIN)
77 #define OMPI_COMM_IS_TOPO(comm) (OMPI_COMM_IS_CART((comm)) || \
78  OMPI_COMM_IS_GRAPH((comm)) || \
79  OMPI_COMM_IS_DIST_GRAPH((comm)))
80 #define OMPI_COMM_IS_MAPBY_NODE(comm) ((comm)->c_flags & OMPI_COMM_MAPBY_NODE)
81 
82 #define OMPI_COMM_SET_DYNAMIC(comm) ((comm)->c_flags |= OMPI_COMM_DYNAMIC)
83 #define OMPI_COMM_SET_INVALID(comm) ((comm)->c_flags |= OMPI_COMM_INVALID)
84 
85 #define OMPI_COMM_SET_PML_ADDED(comm) ((comm)->c_flags |= OMPI_COMM_PML_ADDED)
86 #define OMPI_COMM_SET_EXTRA_RETAIN(comm) ((comm)->c_flags |= OMPI_COMM_EXTRA_RETAIN)
87 #define OMPI_COMM_SET_MAPBY_NODE(comm) ((comm)->c_flags |= OMPI_COMM_MAPBY_NODE)
88 
89 /* a set of special tags: */
90 
91 /* to recognize an MPI_Comm_join in the comm_connect_accept routine. */
92 #define OMPI_COMM_ALLGATHER_TAG -31078
93 #define OMPI_COMM_BARRIER_TAG -31079
94 #define OMPI_COMM_ALLREDUCE_TAG -31080
95 
96 #define OMPI_COMM_ASSERT_NO_ANY_TAG 0x00000001
97 #define OMPI_COMM_ASSERT_NO_ANY_SOURCE 0x00000002
98 #define OMPI_COMM_ASSERT_EXACT_LENGTH 0x00000004
99 #define OMPI_COMM_ASSERT_ALLOW_OVERTAKE 0x00000008
100 
101 #define OMPI_COMM_CHECK_ASSERT(comm, flag) !!((comm)->c_assertions & flag)
102 #define OMPI_COMM_CHECK_ASSERT_NO_ANY_TAG(comm) OMPI_COMM_CHECK_ASSERT(comm, OMPI_COMM_ASSERT_NO_ANY_TAG)
103 #define OMPI_COMM_CHECK_ASSERT_NO_ANY_SOURCE(comm) OMPI_COMM_CHECK_ASSERT(comm, OMPI_COMM_ASSERT_NO_ANY_SOURCE)
104 #define OMPI_COMM_CHECK_ASSERT_EXACT_LENGTH(comm) OMPI_COMM_CHECK_ASSERT(comm, OMPI_COMM_ASSERT_EXACT_LENGTH)
105 #define OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm) OMPI_COMM_CHECK_ASSERT(comm, OMPI_COMM_ASSERT_ALLOW_OVERTAKE)
106 
114 #define OMPI_COMM_CID_INTRA 0x00000020
115 #define OMPI_COMM_CID_INTER 0x00000040
116 #define OMPI_COMM_CID_INTRA_BRIDGE 0x00000080
117 #define OMPI_COMM_CID_INTRA_PMIX 0x00000100
118 #define OMPI_COMM_CID_GROUP 0x00000200
119 
124 #define OMPI_COMM_BLOCK_WORLD 16
125 #define OMPI_COMM_BLOCK_OTHERS 8
126 
127 /* A macro comparing two CIDs */
128 #define OMPI_COMM_CID_IS_LOWER(comm1,comm2) ( ((comm1)->c_contextid < (comm2)->c_contextid)? 1:0)
129 
130 
133 
136  opal_mutex_t c_lock; /* mutex for name and potentially
137  attributes */
138  char c_name[MPI_MAX_OBJECT_NAME];
139  uint32_t c_contextid;
141  uint32_t c_flags; /* flags, e.g. intercomm,
142  topology, etc. */
143  uint32_t c_assertions; /* info assertions */
144 
145  int c_id_available; /* the currently available Cid for allocation
146  to a child*/
147  int c_id_start_index; /* the starting index of the block of cids
148  allocated to this communicator*/
149 
152 
153  struct ompi_communicator_t *c_local_comm; /* a duplicate of the
154  local communicator in
155  case the comm is an
156  inter-comm*/
157 
158  /* Attributes */
160 
163 
164  /* Standard information about the selected topology module (or NULL
165  if this is not a cart, graph or dist graph communicator) */
167 
168  /* index in Fortran <-> C translation array */
170 
171 #ifdef OMPI_WANT_PERUSE
172  /*
173  * Place holder for the PERUSE events.
174  */
175  struct ompi_peruse_handle_t** c_peruse_handles;
176 #endif
177 
178  /* Error handling. This field does not have the "c_" prefix so
179  that the OMPI_ERRHDL_* macros can find it, regardless of whether
180  it's a comm, window, or file. */
181 
184 
185  /* Hooks for PML to hang things */
187 
188  /* Collectives module interface and data */
190 };
192 
248 /* Define for the preallocated size of the predefined handle.
249  * Note that we are using a pointer type as the base memory chunk
250  * size so when the bitness changes the size of the handle changes.
251  * This is done so we don't end up needing a structure that is
252  * incredibly larger than necessary because of the bitness.
253  *
254  * This padding mechanism works as a (likely) compile time check for when the
255  * size of the ompi_communicator_t exceeds the predetermined size of the
256  * ompi_predefined_communicator_t. It also allows us to change the size of
257  * the ompi_communicator_t without impacting the size of the
258  * ompi_predefined_communicator_t structure for some number of additions.
259  *
260  * Note: we used to define the PAD as a multiple of sizeof(void*).
261  * However, this makes a different size PAD, depending on
262  * sizeof(void*). In some cases
263  * (https://github.com/open-mpi/ompi/issues/3610), 32 bit builds can
264  * run out of space when 64 bit builds are still ok. So we changed to
265  * use just a naked byte size. As a rule of thumb, however, the size
266  * should probably still be a multiple of 8 so that it has the
267  * possibility of being nicely aligned.
268  *
269  * As an example:
270  * If the size of ompi_communicator_t is less than the size of the _PAD then
271  * the _PAD ensures that the size of the ompi_predefined_communicator_t is
272  * whatever size is defined below in the _PAD macro.
273  * However, if the size of the ompi_communicator_t grows larger than the _PAD
274  * (say by adding a few more function pointers to the structure) then the
275  * 'padding' variable will be initialized to a large number often triggering
276  * a 'array is too large' compile time error. This signals two things:
277  * 1) That the _PAD should be increased.
278  * 2) That users need to be made aware of the size change for the
279  * ompi_predefined_communicator_t structure.
280  *
281  * Q: So you just made a change to communicator structure, do you need to adjust
282  * the PREDEFINED_COMMUNICATOR_PAD macro?
283  * A: Most likely not, but it would be good to check.
284  */
285 #define PREDEFINED_COMMUNICATOR_PAD 512
286 
288  struct ompi_communicator_t comm;
290 };
292 
297 
298 /*
299  * These variables are for the MPI F03 bindings (F03 must bind Fortran
300  * varaiables to symbols; it cannot bind Fortran variables to the
301  * address of a C variable).
302  */
306 
307 
332 {
333  if ((NULL == comm) || (MPI_COMM_NULL == comm) ||
335  return true;
336  else
337  return false;
338 }
339 
344 {
345  return comm->c_my_rank;
346 }
347 
352 {
354 }
355 
361 {
363 }
364 
370 {
371  return comm->c_contextid;
372 }
373 
374 /* return pointer to communicator associated with context id cid,
375  * No error checking is done*/
376 static inline ompi_communicator_t *ompi_comm_lookup(uint32_t cid)
377 {
378  /* array of pointers to communicators, indexed by context ID */
380 }
381 
382 static inline struct ompi_proc_t* ompi_comm_peer_lookup(ompi_communicator_t* comm, int peer_id)
383 {
384 #if OPAL_ENABLE_DEBUG
385  if(peer_id >= comm->c_remote_group->grp_proc_count) {
386  opal_output(0, "ompi_comm_peer_lookup: invalid peer index (%d)", peer_id);
387  return (struct ompi_proc_t *) NULL;
388  }
389 #endif
390  /*return comm->c_remote_group->grp_proc_pointers[peer_id];*/
391  return ompi_group_peer_lookup(comm->c_remote_group,peer_id);
392 }
393 
394 static inline bool ompi_comm_peer_invalid(ompi_communicator_t* comm, int peer_id)
395 {
396  if(peer_id < 0 || peer_id >= comm->c_remote_group->grp_proc_count) {
397  return true;
398  }
399  return false;
400 }
401 
402 
406 int ompi_comm_init(void);
407 
412 
417  ompi_communicator_t** newcomm);
418 
419 
424  ompi_communicator_t **newcomm);
425 
431  ompi_communicator_t *new_comm,
432  int new_rank,
433  int num_procs,
434  ompi_proc_t** topo_procs);
435 
440  int indegree, int sources[],
441  int sourceweights[], int outdegree,
442  int destinations[], int destweights[],
443  MPI_Info info, int reorder,
444  MPI_Comm *comm_dist_graph);
445 
456 OMPI_DECLSPEC int ompi_comm_split (ompi_communicator_t *comm, int color, int key,
457  ompi_communicator_t** newcomm, bool pass_on_topo);
458 
470  int split_type, int key,
471  struct opal_info_t *info,
472  ompi_communicator_t** newcomm);
473 
483 
493 
503 
513 
520 int ompi_comm_compare(ompi_communicator_t *comm1, ompi_communicator_t *comm2, int *result);
521 
526 
537 ompi_communicator_t* ompi_comm_allocate (int local_group_size,
538  int remote_group_size);
539 
567  ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1,
568  bool send_first, int mode);
569 
581  ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1,
582  bool send_first, int mode, ompi_request_t **req);
583 
587 int ompi_comm_finalize (void);
588 
606  ompi_communicator_t* oldcomm,
607  int local_size,
608  int *local_ranks,
609  int remote_size,
610  int *remote_ranks,
611  opal_hash_table_t *attr,
612  ompi_errhandler_t *errh,
613  bool copy_topocomponent,
614  ompi_group_t *local_group,
615  ompi_group_t *remote_group );
616 
635  ompi_communicator_t *oldcomm,
636  int local_size,
637  int *local_ranks,
638  int remote_size,
639  int *remote_ranks,
640  opal_hash_table_t *attr,
641  ompi_errhandler_t *errh,
642  bool copy_topocomponent,
643  ompi_group_t *local_group,
644  ompi_group_t *remote_group,
645  ompi_request_t **req );
646 
653  ompi_communicator_t *bridge_comm,
654  int local_leader,
655  int remote_leader,
656  int tag,
657  int rsize);
658 
663 int ompi_comm_overlapping_groups (int size, struct ompi_proc_t ** lprocs,
664  int rsize, struct ompi_proc_t ** rprocs);
665 
672  int high );
673 
674 
676  ompi_communicator_t *bridgecomm, const void *arg0,
677  const void *arg1, bool send_first, int mode);
678 
692  ompi_communicator_t *bridgecomm, const void *arg0,
693  const void *arg1, bool send_first, int mode, ompi_request_t **req);
694 
698 int ompi_comm_dump ( ompi_communicator_t *comm );
699 
700 /* setting name */
701 int ompi_comm_set_name (ompi_communicator_t *comm, const char *name );
702 
703 /* global variable to save the number od dynamic communicators */
704 extern int ompi_comm_num_dyncomm;
705 
706 
707 /* check whether any of the processes has requested support for
708  MPI_THREAD_MULTIPLE. Note, that this produces global
709  information across MPI_COMM_WORLD, in contrary to the local
710  flag ompi_mpi_thread_provided
711 */
712 OMPI_DECLSPEC int ompi_comm_cid_init ( void );
713 
714 
715 void ompi_comm_assert_subscribe (ompi_communicator_t *comm, int32_t assert_flag);
716 
718 
719 #endif /* OMPI_COMMUNICATOR_H */
720 
ompi_comm_invalid
static int ompi_comm_invalid(ompi_communicator_t *comm)
Is this a valid communicator? This is a complicated question.
Definition: communicator.h:331
coll.h
ompi_comm_overlapping_groups
int ompi_comm_overlapping_groups(int size, struct ompi_proc_t **lprocs, int rsize, struct ompi_proc_t **rprocs)
This routine verifies, whether local_group and remote group are overlapping in intercomm_create.
Definition: comm.c:1701
OMPI_COMM_INTER
#define OMPI_COMM_INTER
Definition: communicator.h:52
OMPI_COMM_IS_FREED
#define OMPI_COMM_IS_FREED(comm)
Definition: communicator.h:72
ompi_comm_size
static int ompi_comm_size(ompi_communicator_t *comm)
size of the communicator
Definition: communicator.h:351
ompi_communicator_t::c_id_start_index
int c_id_start_index
Definition: communicator.h:147
ompi_predefined_communicator_t::comm
struct ompi_communicator_t comm
Definition: communicator.h:288
opal_hash_table_t
Definition: opal_hash_table.h:49
info
static output_desc_t info[64]
Definition: output.c:114
group
void group(tm_affinity_mat_t *, tm_tree_t *, tm_tree_t *, int, int, int, double *, tm_tree_t **)
ompi_mpi_communicators
opal_pointer_array_t ompi_mpi_communicators
Definition: comm_init.c:55
ompi_comm_set_name
int ompi_comm_set_name(ompi_communicator_t *comm, const char *name)
Definition: comm.c:1315
ompi_comm_finalize
int ompi_comm_finalize(void)
shut down the communicator infrastructure.
Definition: comm_init.c:265
ompi_communicator_t::c_local_comm
struct ompi_communicator_t * c_local_comm
Definition: communicator.h:153
ompi_comm_set_nb
int ompi_comm_set_nb(ompi_communicator_t **ncomm, ompi_communicator_t *oldcomm, int local_size, int *local_ranks, int remote_size, int *remote_ranks, opal_hash_table_t *attr, ompi_errhandler_t *errh, bool copy_topocomponent, ompi_group_t *local_group, ompi_group_t *remote_group, ompi_request_t **req)
This is THE routine, where all the communicator stuff is really set.
Definition: comm.c:133
comm_request.h
ompi_comm_split
int ompi_comm_split(ompi_communicator_t *comm, int color, int key, ompi_communicator_t **newcomm, bool pass_on_topo)
split a communicator based on color and key.
Definition: comm.c:406
ompi_mpi_comm_parent
ompi_communicator_t * ompi_mpi_comm_parent
Definition: comm_init.c:61
ompi_communicator_t::c_coll
mca_coll_base_comm_coll_t * c_coll
Definition: communicator.h:189
opal_infosubscriber_t
Definition: info_subscriber.h:41
ompi_comm_dup
int ompi_comm_dup(ompi_communicator_t *comm, ompi_communicator_t **newcomm)
dup a communicator.
Definition: comm.c:969
ompi_comm_group
int ompi_comm_group(ompi_communicator_t *comm, ompi_group_t **group)
extract the local group from a communicator
Definition: comm.c:258
info.h
mutex.h
remote_size
static void remote_size(int fd, short args, void *cbdata)
Definition: dfs_orted.c:2213
ompi_comm_idup
int ompi_comm_idup(ompi_communicator_t *comm, ompi_communicator_t **newcomm, ompi_request_t **request)
dup a communicator (non-blocking).
Definition: comm.c:1044
ompi_topo_dist_graph_create_adjacent
int ompi_topo_dist_graph_create_adjacent(ompi_communicator_t *old_comm, int indegree, int sources[], int sourceweights[], int outdegree, int destinations[], int destweights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph)
Back end of MPI_DIST_GRAPH_CREATE_ADJACENT.
BEGIN_C_DECLS
#define BEGIN_C_DECLS
code that should be in ompi_config_bottom.h regardless of build status
Definition: opal_config_bottom.h:85
ompi_group_peer_lookup
static struct ompi_proc_t * ompi_group_peer_lookup(ompi_group_t *group, int peer_id)
Inline function to check if sparse groups are enabled and return the direct access to the proc pointe...
Definition: group.h:412
ompi_mpi_comm_world_addr
ompi_predefined_communicator_t * ompi_mpi_comm_world_addr
Definition: comm_init.c:63
ompi_proc_t
Definition: proc.h:71
ompi_communicator_t::c_contextid
uint32_t c_contextid
Definition: communicator.h:139
ompi_communicator_t
Definition: communicator.h:134
ompi_comm_dump
int ompi_comm_dump(ompi_communicator_t *comm)
a simple function to dump the structure
Definition: comm.c:1799
proc.h
ompi_group_t::grp_proc_count
int grp_proc_count
number of processes in group
Definition: group.h:85
ompi_comm_compare
int ompi_comm_compare(ompi_communicator_t *comm1, ompi_communicator_t *comm2, int *result)
compare two communicators.
Definition: comm.c:1230
ompi_comm_peer_invalid
static bool ompi_comm_peer_invalid(ompi_communicator_t *comm, int peer_id)
Definition: communicator.h:394
opal_object.h
errhandler.h
ompi_comm_peer_lookup
static struct ompi_proc_t * ompi_comm_peer_lookup(ompi_communicator_t *comm, int peer_id)
Definition: communicator.h:382
ompi_comm_create_group
int ompi_comm_create_group(ompi_communicator_t *comm, ompi_group_t *group, int tag, ompi_communicator_t **newcomm)
Non-collective create communicator based on a group.
Definition: comm.c:1185
ompi_comm_create
int ompi_comm_create(ompi_communicator_t *comm, ompi_group_t *group, ompi_communicator_t **newcomm)
create a communicator based on a group
Definition: comm.c:273
ompi_errhandler_type_t
ompi_errhandler_type_t
Enum used to describe what kind MPI object an error handler is used for.
Definition: errhandler.h:81
ompi_comm_get_rprocs
struct ompi_proc_t ** ompi_comm_get_rprocs(ompi_communicator_t *local_comm, ompi_communicator_t *bridge_comm, int local_leader, int remote_leader, int tag, int rsize)
This is a short-hand routine used in intercomm_create.
Definition: comm.c:1523
opal_mutex_t
Definition: mutex_unix.h:49
ompi_comm_nextcid
int ompi_comm_nextcid(ompi_communicator_t *newcomm, ompi_communicator_t *comm, ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1, bool send_first, int mode)
allocate new communicator ID
Definition: comm_cid.c:281
ompi_communicator_t::c_local_group
ompi_group_t * c_local_group
Definition: communicator.h:150
ompi_comm_activate
int ompi_comm_activate(ompi_communicator_t **newcomm, ompi_communicator_t *comm, ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1, bool send_first, int mode)
Definition: comm_cid.c:535
request
Definition: evdns.c:171
ompi_comm_num_dyncomm
int ompi_comm_num_dyncomm
Definition: comm_init.c:80
ompi_communicator_t::c_name
char c_name[MPI_MAX_OBJECT_NAME]
Definition: communicator.h:138
ompi_errhandler_t
Back-end type for MPI_Errorhandler.
Definition: errhandler.h:104
mca_coll_base_comm_coll_t
Collectives communicator cache structure.
Definition: coll.h:509
ompi_mpi_comm_self
ompi_predefined_communicator_t ompi_mpi_comm_self
Definition: comm_init.c:59
ompi_communicator_t::c_lock
opal_mutex_t c_lock
Definition: communicator.h:136
name
char * name
Definition: orted_main.c:131
ompi_comm_lookup
static ompi_communicator_t * ompi_comm_lookup(uint32_t cid)
Definition: communicator.h:376
ompi_comm_cid_init
int ompi_comm_cid_init(void)
Definition: comm_cid.c:160
ompi_request_t
Main top-level request struct definition.
Definition: request.h:124
num_procs
char * num_procs
Definition: orted_main.c:133
ompi_mpi_comm_self_addr
ompi_predefined_communicator_t * ompi_mpi_comm_self_addr
Definition: comm_init.c:65
info_subscriber.h
opal_output
void opal_output(int output_id, const char *format,...)
Definition: output.c:367
ompi_communicator_t::c_topo
struct mca_topo_base_module_t * c_topo
Definition: communicator.h:166
ompi_comm_idup_with_info
int ompi_comm_idup_with_info(ompi_communicator_t *comm, opal_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req)
dup a communicator (non-blocking) with info.
Definition: comm.c:1049
ompi_comm_get_cid
static uint32_t ompi_comm_get_cid(ompi_communicator_t *comm)
Context ID for the communicator, suitable for passing to ompi_comm_lookup for getting the communicato...
Definition: communicator.h:369
mca_topo_base_module_t
Definition: topo.h:321
ompi_communicator_t::c_pml_comm
struct mca_pml_comm_t * c_pml_comm
Definition: communicator.h:186
PREDEFINED_COMMUNICATOR_PAD
#define PREDEFINED_COMMUNICATOR_PAD
Padded struct to maintain back compatibiltiy.
Definition: communicator.h:285
ompi_mpi_comm_null
ompi_predefined_communicator_t ompi_mpi_comm_null
Definition: comm_init.c:60
ompi_communicator_t::c_cube_dim
int c_cube_dim
Definition: communicator.h:162
ompi_communicator_t::c_remote_group
ompi_group_t * c_remote_group
Definition: communicator.h:151
group.h
ompi_comm_free
int ompi_comm_free(ompi_communicator_t **comm)
free a communicator
Definition: comm.c:1437
ompi_comm_activate_nb
int ompi_comm_activate_nb(ompi_communicator_t **newcomm, ompi_communicator_t *comm, ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1, bool send_first, int mode, ompi_request_t **req)
Non-blocking variant of comm_activate.
Definition: comm_cid.c:480
ompi_comm_rank
static int ompi_comm_rank(ompi_communicator_t *comm)
rank w/in the communicator
Definition: communicator.h:343
ompi_predefined_communicator_t::padding
char padding[512 - sizeof(ompi_communicator_t)]
Definition: communicator.h:289
ompi_mpi_comm_world
ompi_predefined_communicator_t ompi_mpi_comm_world
Definition: comm_init.c:58
ompi_communicator_t::c_my_rank
int c_my_rank
Definition: communicator.h:140
ompi_communicator_t::c_flags
uint32_t c_flags
Definition: communicator.h:141
ompi_comm_set
int ompi_comm_set(ompi_communicator_t **newcomm, ompi_communicator_t *oldcomm, int local_size, int *local_ranks, int remote_size, int *remote_ranks, opal_hash_table_t *attr, ompi_errhandler_t *errh, bool copy_topocomponent, ompi_group_t *local_group, ompi_group_t *remote_group)
This is THE routine, where all the communicator stuff is really set.
Definition: comm.c:101
ompi_communicator_t::c_assertions
uint32_t c_assertions
Definition: communicator.h:143
ompi_comm_f_to_c_table
opal_pointer_array_t ompi_comm_f_to_c_table
Definition: comm_init.c:56
opal_hash_table.h
ompi_communicator_t::c_f_to_c_index
int c_f_to_c_index
Definition: communicator.h:169
ompi_communicator_t::c_id_available
int c_id_available
Definition: communicator.h:145
OBJ_CLASS_DECLARATION
BEGIN_C_DECLS OBJ_CLASS_DECLARATION(ompi_communicator_t)
ompi_group_t
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:83
opal_pointer_array_t
dynamic pointer array
Definition: opal_pointer_array.h:43
ompi_comm_init
int ompi_comm_init(void)
Initialise MPI_COMM_WORLD and MPI_COMM_SELF.
Definition: comm_init.c:85
ompi_comm_assert_subscribe
void ompi_comm_assert_subscribe(ompi_communicator_t *comm, int32_t assert_flag)
Definition: comm_init.c:488
opal_pointer_array_get_item
static void * opal_pointer_array_get_item(opal_pointer_array_t *table, int element_index)
Get the value of an element in array.
Definition: opal_pointer_array.h:125
ompi_comm_enable
int ompi_comm_enable(ompi_communicator_t *old_comm, ompi_communicator_t *new_comm, int new_rank, int num_procs, ompi_proc_t **topo_procs)
Take an almost complete communicator and reserve the CID as well as activate it (initialize the colle...
Definition: comm.c:1882
mca_pml_comm_t
Cached on ompi_communicator_t to hold queues/state used by the PML<->PTL interface for matching logic...
Definition: pml_ob1_comm.h:55
ompi_comm_dup_with_info
int ompi_comm_dup_with_info(ompi_communicator_t *comm, opal_info_t *info, ompi_communicator_t **newcomm)
dup a communicator with info.
Definition: comm.c:977
OMPI_COMM_IS_INVALID
#define OMPI_COMM_IS_INVALID(comm)
Definition: communicator.h:74
ompi_peruse_handle_t
Definition: peruse-internal.h:30
ompi_communicator_t::super
opal_infosubscriber_t super
Definition: communicator.h:135
ompi_comm_allocate
ompi_communicator_t * ompi_comm_allocate(int local_group_size, int remote_group_size)
allocate a new communicator structure
Definition: comm_init.c:239
ompi_communicator_t::c_keyhash
struct opal_hash_table_t * c_keyhash
inscribing cube dimension
Definition: communicator.h:159
ompi_comm_determine_first
int ompi_comm_determine_first(ompi_communicator_t *intercomm, int high)
This is a routine determining whether the local or the remote group will be first in the new intra-co...
Definition: comm.c:1722
ompi_config.h
ompi_communicator_t::error_handler
ompi_errhandler_t * error_handler
Definition: communicator.h:182
ompi_communicator_t
struct ompi_communicator_t ompi_communicator_t
Definition: communicator.h:191
ompi_predefined_communicator_t
Definition: communicator.h:287
END_C_DECLS
#define END_C_DECLS
Definition: opal_config_bottom.h:86
ompi_comm_nextcid_nb
int ompi_comm_nextcid_nb(ompi_communicator_t *newcomm, ompi_communicator_t *comm, ompi_communicator_t *bridgecomm, const void *arg0, const void *arg1, bool send_first, int mode, ompi_request_t **req)
allocate new communicator ID (non-blocking)
Definition: comm_cid.c:249
ompi_comm_remote_size
static int ompi_comm_remote_size(ompi_communicator_t *comm)
size of the remote group for inter-communicators.
Definition: communicator.h:360
ompi_communicator_t::errhandler_type
ompi_errhandler_type_t errhandler_type
Definition: communicator.h:183
mode
prog_mode_t mode
Definition: sync.c:28
opal_info_t
Definition: info.h:40
ompi_mpi_comm_null_addr
ompi_predefined_communicator_t * ompi_mpi_comm_null_addr
Definition: comm_init.c:67
OMPI_DECLSPEC
#define OMPI_DECLSPEC
Definition: ompi_config.h:52
NULL
#define NULL
Copyright (C) 2000-2004 by Etnus, LLC.
Definition: ompi_msgq_dll.c:136
ompi_comm_split_type
int ompi_comm_split_type(ompi_communicator_t *comm, int split_type, int key, struct opal_info_t *info, ompi_communicator_t **newcomm)
split a communicator based on type and key.
Definition: comm.c:785