Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit efe274b

Browse files
committed
osc/pt2pt: make receive count an unsigned int
This receive_count MCA variable should never be negative. Change it to an unsigned int. Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from commit open-mpi/ompi@40b7088)
1 parent 4f55fc7 commit efe274b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ompi/mca/osc/pt2pt/osc_pt2pt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ struct ompi_osc_pt2pt_module_t {
256256
struct ompi_osc_pt2pt_receive_t *recv_frags;
257257

258258
/** number of receive fragments */
259-
int recv_frag_count;
259+
unsigned int recv_frag_count;
260260

261261
/* enforce accumulate semantics */
262262
opal_atomic_lock_t accumulate_lock;

ompi/mca/osc/pt2pt/osc_pt2pt_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int component_register (void)
145145
mca_osc_pt2pt_component.receive_count = 4;
146146
(void) mca_base_component_var_register (&mca_osc_pt2pt_component.super.osc_version, "receive_count",
147147
"Number of receives to post for each window for incoming fragments "
148-
"(default: 4)", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_4,
148+
"(default: 4)", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_4,
149149
MCA_BASE_VAR_SCOPE_READONLY, &mca_osc_pt2pt_component.receive_count);
150150

151151
return OMPI_SUCCESS;

ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ int ompi_osc_pt2pt_frag_start_receive (ompi_osc_pt2pt_module_t *module)
17001700
int rc;
17011701

17021702
module->recv_frag_count = mca_osc_pt2pt_component.receive_count;
1703-
if (module->recv_frag_count < 0) {
1703+
if (0 == module->recv_frag_count) {
17041704
module->recv_frag_count = 1;
17051705
}
17061706

0 commit comments

Comments
 (0)