Skip to content

Commit 62bedbd

Browse files
committed
Initialize variable
Initialize the "bootstrap" flag to false in the grpcomm struct for tracking group operations. Signed-off-by: Ralph Castain <[email protected]>
1 parent ab2cf40 commit 62bedbd

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/mca/grpcomm/direct/grpcomm_direct_component.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
77
* Copyright (c) 2019 Research Organization for Information Science
88
* and Technology (RIST). All rights reserved.
9-
* Copyright (c) 2021-2025 Nanook Consulting All rights reserved.
9+
* Copyright (c) 2021-2026 Nanook Consulting All rights reserved.
1010
* $COPYRIGHT$
1111
*
1212
* Additional copyrights may follow
@@ -135,6 +135,7 @@ static void gccon(prte_grpcomm_group_t *p)
135135
p->status = PMIX_SUCCESS;
136136
p->dmns = NULL;
137137
p->ndmns = 0;
138+
p->bootstrap = false;
138139
p->nexpected = 0;
139140
p->nreported = 0;
140141
p->nleaders = 0;

src/mca/grpcomm/direct/grpcomm_direct_group.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,12 @@ static void group(int sd, short args, void *cbdata)
119119
if (PMIX_CHECK_KEY(&cd->directives[i], PMIX_GROUP_ASSIGN_CONTEXT_ID)) {
120120
sig.assignID = PMIX_INFO_TRUE(&cd->directives[i]);
121121

122-
#ifdef PMIX_GROUP_BOOTSTRAP
123122
} else if (PMIX_CHECK_KEY(&cd->directives[i], PMIX_GROUP_BOOTSTRAP)) {
124123
PMIX_VALUE_GET_NUMBER(rc, &cd->directives[i].value, sig.bootstrap, size_t);
125124
if (PMIX_SUCCESS != rc) {
126125
PMIX_ERROR_LOG(rc);
127126
PMIX_DESTRUCT(&sig);
128127
}
129-
#endif
130128

131129
} else if (PMIX_CHECK_KEY(&cd->directives[i], PMIX_LOCAL_COLLECTIVE_STATUS)) {
132130
PMIX_VALUE_GET_NUMBER(rc, &cd->directives[i].value, st, pmix_status_t);
@@ -435,24 +433,24 @@ void prte_grpcomm_direct_grp_recv(int status, pmix_proc_t *sender,
435433
if (0 < sig->bootstrap) {
436434
// this came from a bootstrap leader
437435
coll->nleaders_reported++;
438-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
436+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
439437
"%s grpcomm:direct group recv leader nrep %d of %d",
440438
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), (int) coll->nleaders_reported,
441-
(int) coll->nleaders));
439+
(int) coll->nleaders);
442440
} else if (sig->follower) {
443441
// came from a bootstrap follower
444442
coll->nfollowers_reported++;
445-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
443+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
446444
"%s grpcomm:direct group recv follower nrep %d of %d",
447445
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), (int) coll->nfollowers_reported,
448-
(int) coll->nfollowers));
446+
(int) coll->nfollowers);
449447
} else {
450448
// group collective op
451449
coll->nreported++;
452-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
450+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
453451
"%s grpcomm:direct group recv nexpected %d nrep %d",
454452
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), (int) coll->nexpected,
455-
(int) coll->nreported));
453+
(int) coll->nreported);
456454
}
457455

458456

@@ -462,9 +460,9 @@ void prte_grpcomm_direct_grp_recv(int status, pmix_proc_t *sender,
462460
(!coll->bootstrap && coll->nreported == coll->nexpected)) {
463461

464462
if (PRTE_PROC_IS_MASTER) {
465-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
463+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
466464
"%s grpcomm:direct group HNP reports complete for %s",
467-
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), coll->sig->groupID));
465+
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), coll->sig->groupID);
468466

469467
/* the allgather is complete - send the xcast */
470468
if (PMIX_GROUP_CONSTRUCT == sig->op) {
@@ -564,7 +562,7 @@ void prte_grpcomm_direct_grp_recv(int status, pmix_proc_t *sender,
564562
++m;
565563
}
566564
PMIX_LIST_DESTRUCT(&nmlist);
567-
565+
568566
// zero out the final order cache - no need to send it around
569567
PMIX_PROC_FREE(coll->sig->final_order, coll->sig->nfinal);
570568
coll->sig->final_order = NULL;
@@ -1097,10 +1095,10 @@ static prte_grpcomm_group_t *get_tracker(prte_grpcomm_direct_group_signature_t *
10971095
// must match groupID's and ops
10981096
if (0 == strcmp(sig->groupID, coll->sig->groupID) &&
10991097
sig->op == coll->sig->op) {
1100-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
1098+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
11011099
"%s grpcomm:direct:group:returning existing collective %s",
11021100
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME),
1103-
sig->groupID));
1101+
sig->groupID);
11041102
// if this is a bootstrap, then we have to track the number of leaders
11051103
if (0 < sig->bootstrap) {
11061104
if (0 < coll->nleaders) {
@@ -1240,9 +1238,9 @@ static prte_grpcomm_group_t *get_tracker(prte_grpcomm_direct_group_signature_t *
12401238
/* if we get here, then this is a new collective - so create
12411239
* the tracker for it unless directed otherwise */
12421240
if (!create) {
1243-
PMIX_OUTPUT_VERBOSE((1, prte_grpcomm_base_framework.framework_output,
1241+
pmix_output_verbose(1, prte_grpcomm_base_framework.framework_output,
12441242
"%s grpcomm:base: not creating new coll",
1245-
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME)));
1243+
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME));
12461244

12471245
return NULL;
12481246
}

0 commit comments

Comments
 (0)