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
60
61/*
62 * MPI_Group_size returns number of processes in group
63 * MPI_Group_rank returns rank of calling process in group
64 * MPI_Group_compare compares group members and group order
65 * MPI_Group_union creates a group by combining two groups
66 * MPI_Group_intersection creates a group from the intersection of two groups
67 * MPI_Group_difference creates a group from the difference between two groups
68 * MPI_Group_incl creates a group from listed members of an existing group
69 * MPI_Group_excl creates a group excluding listed members of an existing group
70 * MPI_Group_free marks a group for deallocation
71 * MPI_Group_translate_ranks translates ranks of processes in one group to those in another group
72
73 TODO-
74 MPI_Group_range_incl creates a group according to first rank, stride, last rank
75 MPI_Group_range_excl creates a group by deleting according to first rank, stride, last rank
76
77 MPI_GROUP_NULL
78 MPI_GROUP_EMPTY
79*/
80
87
89
90extern int nm_group_size(nm_group_t group);
91
93extern int nm_group_rank(nm_group_t group);
94
95extern nm_gate_t nm_group_get_gate(nm_group_t p_group, int rank);
96
99
101
104
105extern int nm_group_compare(nm_group_t group1, nm_group_t group2);
106
107extern void nm_group_free(nm_group_t group);
108
110
111extern nm_group_t nm_group_incl(nm_group_t group, int n, const int ranks[]);
112
113extern nm_group_t nm_group_excl(nm_group_t group, int n, const int ranks[]);
114
116
118
120
121extern int nm_group_translate_ranks(nm_group_t p_group1, int n, const int*ranks1, nm_group_t p_group2, int*ranks2);
122
int nm_group_translate_ranks(nm_group_t p_group1, int n, const int *ranks1, nm_group_t p_group2, int *ranks2)
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
void nm_group_add_node(nm_group_t p_group, nm_gate_t p_gate)
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
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_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)
This is the common public header for NewMad.
a description of hierarchy of processes; both vects are empty when no topology is available
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:104