NewMadeleine

Documentation

« back to PM2 home.
nm_comm.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2014-2026 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
20#include <nm_public.h>
22#include <Padico/Puk.h>
23
35typedef struct nm_comm_s*nm_comm_t;
36
38extern nm_comm_t nm_comm_world(const char*label);
39
41extern nm_comm_t nm_comm_self(const char*label);
42
45
49
52
55
57static int nm_comm_size(nm_comm_t comm);
58
60static int nm_comm_rank(nm_comm_t comm);
61
64
67
70
73
76
79
static nm_group_t nm_comm_group(nm_comm_t comm)
get the group of nodes in the communicator- real group, not a duplicate
struct nm_comm_s * nm_comm_t
NewMadeleine communicator opaque type.
Definition nm_comm.h:35
nm_comm_t nm_comm_create_group(nm_session_t p_session, nm_group_t p_newcomm_group, nm_group_t p_bcast_group)
create a new communicator, new communicator group is p_newcomm_group, collectively called from group ...
void nm_comm_destroy(nm_comm_t p_comm)
destroy a communicator- no synchronization is done
nm_comm_t nm_comm_create(nm_comm_t comm, nm_group_t group)
create a sub-communicator containing nodes in group- collective on parent communicator
nm_comm_t nm_comm_dup(nm_comm_t comm)
get a duplicate of the given communicator- collective on parent communicator
static nm_gate_t nm_comm_gate_self(nm_comm_t p_comm)
get the gate for self in the given communicator
static nm_gate_t nm_comm_get_gate(nm_comm_t p_comm, int rank)
get the gate for the given rank in communicator numbering
static int nm_comm_rank(nm_comm_t comm)
get the rank of self in the given communicator
nm_comm_t nm_comm_get_by_session(nm_session_t p_session)
get the communicator from the session; may return NULL if no communicator is attached to this session
static nm_session_t nm_comm_get_session(nm_comm_t p_comm)
get the session attached to the communicator
nm_comm_t nm_comm_self(const char *label)
create a new communicator containing only self, with given label
static int nm_comm_size(nm_comm_t comm)
get the number of nodes in the communicator
nm_comm_t nm_comm_world(const char *label)
create a new global communicator with given label
static int nm_comm_get_dest(nm_comm_t p_comm, nm_gate_t p_gate)
get the rank for the given gate, in communicator numbering
struct nm_group_s * nm_group_t
type for groups
Definition nm_group.h:38
static nm_comm_t p_comm
static nm_session_t p_session
static nm_gate_t p_gate
This is the common public header for NewMad.
Connection to another process.
Definition nm_gate.h:104