32 #include "ompi_config.h"
40 #define BSIZE ((int)sizeof(unsigned char)*8)
56 int grp_strided_offset;
62 unsigned char *grp_bitmap_array;
63 int grp_bitmap_array_len;
106 #define PREDEFINED_GROUP_PAD (sizeof(void*) * 32)
120 #include "group_dbg.h"
122 #define OMPI_GROUP_IS_INTRINSIC(_group) ((_group)->grp_flags&OMPI_GROUP_INTRINSIC)
123 #define OMPI_GROUP_IS_DENSE(_group) ((_group)->grp_flags & OMPI_GROUP_DENSE)
124 #define OMPI_GROUP_IS_SPORADIC(_group) ((_group)->grp_flags & OMPI_GROUP_SPORADIC)
125 #define OMPI_GROUP_IS_STRIDED(_group) ((_group)->grp_flags & OMPI_GROUP_STRIDED)
126 #define OMPI_GROUP_IS_BITMAP(_group) ((_group)->grp_flags & OMPI_GROUP_BITMAP)
128 #define OMPI_GROUP_SET_INTRINSIC(_group) ( (_group)->grp_flags |= OMPI_GROUP_INTRINSIC)
129 #define OMPI_GROUP_SET_DENSE(_group) ( (_group)->grp_flags |= OMPI_GROUP_DENSE)
130 #define OMPI_GROUP_SET_SPORADIC(_group) ( (_group)->grp_flags |= OMPI_GROUP_SPORADIC)
131 #define OMPI_GROUP_SET_STRIDED(_group) ( (_group)->grp_flags |= OMPI_GROUP_STRIDED)
132 #define OMPI_GROUP_SET_BITMAP(_group) ( (_group)->grp_flags |= OMPI_GROUP_BITMAP)
140 #if OPAL_ENABLE_FT_MPI
144 OMPI_DECLSPEC
extern ompi_group_t *ompi_group_all_failed_procs;
159 ompi_group_t *ompi_group_allocate_sporadic(
int group_size);
161 ompi_group_t *ompi_group_allocate_bmap(
int orig_group_size,
int group_size);
238 int n_ranks,
int *ranks1,
259 int ompi_group_translate_ranks_sporadic (
ompi_group_t *group1,
260 int n_ranks,
int *ranks1,
263 int ompi_group_translate_ranks_sporadic_reverse (
ompi_group_t *group1,
264 int n_ranks,
int *ranks1,
267 int ompi_group_translate_ranks_strided (
ompi_group_t *group1,
268 int n_ranks,
int *ranks1,
271 int ompi_group_translate_ranks_strided_reverse (
ompi_group_t *group1,
272 int n_ranks,
int *ranks1,
275 int ompi_group_translate_ranks_bmap (
ompi_group_t *group1,
276 int n_ranks,
int *ranks1,
279 int ompi_group_translate_ranks_bmap_reverse (
ompi_group_t *group1,
280 int n_ranks,
int *ranks1,
290 int ompi_group_excl(
ompi_group_t* group,
int n,
int *ranks,
292 int ompi_group_range_incl(
ompi_group_t* group,
int n_triplets,
294 int ompi_group_range_excl(
ompi_group_t* group,
int n_triplets,
309 int ompi_group_incl_spor(
ompi_group_t* group,
int n,
int *ranks,
311 int ompi_group_incl_strided(
ompi_group_t* group,
int n,
int *ranks,
313 int ompi_group_incl_bmap(
ompi_group_t* group,
int n,
int *ranks,
320 int ompi_group_calc_strided (
int n,
int *ranks );
321 int ompi_group_calc_sporadic (
int n,
int *ranks );
322 int ompi_group_calc_bmap (
int n,
int orig_size ,
int *ranks );
335 #if OPAL_ENABLE_DEBUG
337 opal_output(0,
"ompi_group_lookup_peer: invalid peer index (%d)", peer_id);
341 #if OMPI_GROUP_SPARSE
OMPI_DECLSPEC void ompi_group_increment_proc_count(ompi_group_t *group)
Increment the reference count of the proc structures.
Definition: group_init.c:210
int ompi_group_init(void)
Initialize OMPI group infrastructure.
Definition: group_init.c:309
opal_object_t super
base class
Definition: group.h:80
OPAL output stream facility.
dynamic pointer array
Definition: opal_pointer_array.h:45
int ompi_group_incl_plist(ompi_group_t *group, int n, int *ranks, ompi_group_t **new_group)
Include Functions to handle Sparse storage formats.
Definition: group_plist.c:35
struct ompi_group_t * grp_parent_group_ptr
pointer to the original group when using sparse storage
Definition: group.h:89
static int ompi_group_rank(ompi_group_t *group)
Get group rank.
Definition: group.h:215
int ompi_group_dump(ompi_group_t *group)
Function to print the group info.
Definition: group.c:118
int ompi_group_div_ceil(int num, int den)
Ceil Function so not to include the math.h lib.
Definition: group_bitmap.c:119
OMPI_DECLSPEC void ompi_group_decrement_proc_count(ompi_group_t *group)
Decrement the reference count of the proc structures.
Definition: group_init.c:224
int grp_proc_count
number of processes in group
Definition: group.h:81
See opal_bitmap.h for an explanation of why there is a split between OPAL and ORTE for this generic c...
Process identification structure interface.
Remote Open MPI process structure.
Definition: proc.h:56
OMPI_DECLSPEC int ompi_group_peer_lookup_id(ompi_group_t *group, ompi_proc_t *proc)
Determine the rank of the specified process in this group.
Definition: group_plist.c:305
int grp_f_to_c_index
index in Fortran <-> C translation array
Definition: group.h:83
int grp_sporadic_list_len
list to hold the sporadic struct
Definition: group.h:52
OMPI_DECLSPEC int ompi_group_translate_ranks(ompi_group_t *group1, int n_ranks, int *ranks1, ompi_group_t *group2, int *ranks2)
Abstracting MPI_Group_translate_ranks to an ompi function for internal use.
Definition: group.c:41
int grp_strided_last_element
stride for including or excluding
Definition: group.h:58
OPAL_DECLSPEC void opal_output(int output_id, const char *format,...) __opal_attribute_format__(__printf__
Main function to send output to a stream.
#define PREDEFINED_GROUP_PAD
Padded struct to maintain back compatibiltiy.
Definition: group.h:106
struct ompi_proc_t ** grp_proc_pointers
list of pointers to ompi_proc_t structures for each process in the group
Definition: group.h:84
int grp_strided_stride
offset to start from when including or excluding
Definition: group.h:57
OMPI_DECLSPEC int ompi_group_incl(ompi_group_t *group, int n, int *ranks, ompi_group_t **new_group)
Prototypes for the group back-end functions.
Definition: group.c:199
int ompi_group_free(ompi_group_t **group)
Abstracting MPI_Group_free, since it is required by some internal functions...
Definition: group.c:29
int grp_my_rank
rank in group
Definition: group.h:82
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:333
OMPI_DECLSPEC struct opal_pointer_array_t ompi_group_f_to_c_table
Table for Fortran <-> C group handle conversion.
Definition: group_init.c:41
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:79
uint32_t grp_flags
flags, e.g.
Definition: group.h:87
Base object.
Definition: opal_object.h:182
int ompi_group_minloc(int list[], int length)
Function to return the minimum value in an array.
Definition: group.c:184
int ompi_group_finalize(void)
Clean up OMPI group infrastructure.
Definition: group_init.c:351
static int ompi_group_size(ompi_group_t *group)
Get group size.
Definition: group.h:202
OMPI_DECLSPEC int ompi_group_compare(ompi_group_t *group1, ompi_group_t *group2, int *result)
Abstracting MPI_Group_compare to an ompi function for internal use.
Definition: group.c:511
OMPI_DECLSPEC ompi_group_t * ompi_group_allocate(int group_size)
Allocate a new group structure.
Definition: group_init.c:56
OMPI_DECLSPEC ompi_proc_t * ompi_group_get_proc_ptr(ompi_group_t *group, int rank)
Functions to handle process pointers for sparse group formats.
Definition: group.c:169
void ompi_set_group_rank(ompi_group_t *group, struct ompi_proc_t *proc_pointer)
Set group rank in the input group structure.
Definition: group_set_rank.c:27
int ompi_group_calc_plist(int n, int *ranks)
Functions to calculate storage spaces.
Definition: group_plist.c:31
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236