Skip to content

Commit

Permalink
osc/pt2pt: make receive count an unsigned int
Browse files Browse the repository at this point in the history
This receive_count MCA variable should never be negative. Change it
to an unsigned int.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
  • Loading branch information
hjelmn committed Aug 17, 2016
1 parent ce01246 commit 40b7088
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ompi/mca/osc/pt2pt/osc_pt2pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ struct ompi_osc_pt2pt_module_t {
struct ompi_osc_pt2pt_receive_t *recv_frags;

/** number of receive fragments */
int recv_frag_count;
unsigned int recv_frag_count;

/* enforce accumulate semantics */
opal_atomic_lock_t accumulate_lock;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/osc/pt2pt/osc_pt2pt_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int component_register (void)
mca_osc_pt2pt_component.receive_count = 4;
(void) mca_base_component_var_register (&mca_osc_pt2pt_component.super.osc_version, "receive_count",
"Number of receives to post for each window for incoming fragments "
"(default: 4)", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_4,
"(default: 4)", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_4,
MCA_BASE_VAR_SCOPE_READONLY, &mca_osc_pt2pt_component.receive_count);

return OMPI_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ int ompi_osc_pt2pt_frag_start_receive (ompi_osc_pt2pt_module_t *module)
int rc;

module->recv_frag_count = mca_osc_pt2pt_component.receive_count;
if (module->recv_frag_count < 0) {
if (0 == module->recv_frag_count) {
module->recv_frag_count = 1;
}

Expand Down

0 comments on commit 40b7088

Please sign in to comment.