NewMadeleine

Documentation

« back to PM2 home.
nm_group.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
30/* ********************************************************* */
31
38typedef struct nm_group_s*nm_group_t;
39
40#define NM_GROUP_NULL ((nm_group_t)NULL)
41
42#define NM_GROUP_IDENT 0x01
43#define NM_GROUP_SIMILAR 0x02
44#define NM_GROUP_UNEQUAL 0x04
45
49PUK_VECT_TYPE(nm_coll_subgroup, int);
50
55{
56 struct nm_coll_subgroup_vect_s subgroups;
58};
59
60PUK_VECT_TYPE(nm_coll_rank, int);
61
69
70/*
71 * MPI_Group_size returns number of processes in group
72 * MPI_Group_rank returns rank of calling process in group
73 * MPI_Group_compare compares group members and group order
74 * MPI_Group_union creates a group by combining two groups
75 * MPI_Group_intersection creates a group from the intersection of two groups
76 * MPI_Group_difference creates a group from the difference between two groups
77 * MPI_Group_incl creates a group from listed members of an existing group
78 * MPI_Group_excl creates a group excluding listed members of an existing group
79 * MPI_Group_free marks a group for deallocation
80 * MPI_Group_translate_ranks translates ranks of processes in one group to those in another group
81
82 TODO-
83 MPI_Group_range_incl creates a group according to first rank, stride, last rank
84 MPI_Group_range_excl creates a group by deleting according to first rank, stride, last rank
85
86 MPI_GROUP_NULL
87 MPI_GROUP_EMPTY
88*/
89
96
98
99extern int nm_group_size(nm_group_t group);
100
102extern int nm_group_rank(nm_group_t group);
103
104extern nm_gate_t nm_group_get_gate(nm_group_t p_group, int rank);
105
107
108extern const struct nm_uuid_binary_s*nm_group_get_uuid(nm_group_t p_group);
109
111
113
115
118
119extern int nm_group_compare(nm_group_t group1, nm_group_t group2);
120
121extern void nm_group_free(nm_group_t group);
122
124
125extern nm_group_t nm_group_incl(nm_group_t group, int n, const int ranks[]);
126
127extern nm_group_t nm_group_excl(nm_group_t group, int n, const int ranks[]);
128
130
132
134
136extern int nm_group_translate_ranks(nm_group_t p_group1, int n, const int*p_ranks1, nm_group_t p_group2, int*p_ranks2);
137
nm_group_t nm_group_difference(nm_group_t group1, nm_group_t group2)
int nm_group_compare(nm_group_t group1, nm_group_t group2)
int nm_group_rank(nm_group_t group)
rank of self in the group; -1 if self is not member of the group
int nm_group_size(nm_group_t group)
nm_group_t nm_group_new(void)
create a new empty group
const struct nm_uuid_binary_s * nm_group_get_uuid(nm_group_t p_group)
void nm_group_add_node(nm_group_t p_group, nm_gate_t p_gate)
const struct nm_coll_topology_groups_s * nm_group_get_topology_groups(nm_group_t p_group, int root)
nm_group_t nm_group_intersection(nm_group_t group1, nm_group_t group2)
void nm_group_free(nm_group_t group)
const struct nm_coll_topology_s * nm_group_get_topology(nm_group_t p_group)
nm_gate_t nm_group_get_gate(nm_group_t p_group, int rank)
nm_group_t nm_group_world(void)
get a new group containing all nodes
int nm_group_translate_ranks(nm_group_t p_group1, int n, const int *p_ranks1, nm_group_t p_group2, int *p_ranks2)
translate ranks from group1 to group2 numbering; n may be 0; ranks1 may contain -1; p_ranks1 may be t...
nm_group_t nm_group_union(nm_group_t group1, nm_group_t group2)
int nm_group_get_dest(nm_group_t p_group, nm_gate_t p_gate)
nm_gate_t * nm_group_get_gates(nm_group_t p_group)
nm_group_t nm_group_dup(nm_group_t group)
nm_group_t nm_group_excl(nm_group_t group, int n, const int ranks[])
struct nm_group_s * nm_group_t
type for groups
Definition nm_group.h:38
nm_group_t nm_group_incl(nm_group_t group, int n, const int ranks[])
static nm_gate_t p_gate
PUK_VECT_TYPE(nm_coll_subgroup, int)
int root
This is the common public header for NewMad.
groups-based form of topology
Definition nm_group.h:65
nm_group_t p_leaders_group
group of processes for inter-node; root is 0
Definition nm_group.h:66
nm_group_t p_local_group
group of processes on local node; local root is 0
Definition nm_group.h:67
a description of hierarchy of processes; subgroup is empty when no topology is available and n_subgro...
Definition nm_group.h:55
int n_subgroups
number of distinct subgroups in the above vect
Definition nm_group.h:57
struct nm_coll_subgroup_vect_s subgroups
index of subgroup for each rank
Definition nm_group.h:56
Connection to another process.
Definition nm_gate.h:109
UUID in binary.
Definition nm_types.h:134