From 41f0059f1eb298f1692921ff93bb45df8bb9c77e Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 17 Jun 2014 04:33:43 +0000 Subject: [PATCH] osc/sm: use an unsigned long when calculating the total segment size Brad correctly pointed out that the total window size should not be an int. Changed it to an unsigned long. cmr=v1.8.2:reviewer=bbenton This commit was SVN r32010. --- ompi/mca/osc/sm/osc_sm_component.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ompi/mca/osc/sm/osc_sm_component.c b/ompi/mca/osc/sm/osc_sm_component.c index fd0d3016c6..f2cffb4417 100644 --- a/ompi/mca/osc/sm/osc_sm_component.c +++ b/ompi/mca/osc/sm/osc_sm_component.c @@ -203,9 +203,9 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit if (NULL == module->node_states) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; } else { + unsigned long total, *rbuf; char *data_file; - int *rbuf; - int total, i, flag; + int i, flag; size_t pagesize; size_t state_size; @@ -218,7 +218,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit pagesize = 4096; #endif - rbuf = malloc(sizeof(int) * ompi_comm_size(module->comm)); + rbuf = malloc(sizeof(unsigned long) * ompi_comm_size(module->comm)); if (NULL == rbuf) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; module->noncontig = false; @@ -232,8 +232,8 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit } else { total = size; } - ret = module->comm->c_coll.coll_allgather(&total, 1, MPI_INT, - rbuf, 1, MPI_INT, + ret = module->comm->c_coll.coll_allgather(&total, 1, MPI_UNSIGNED_LONG, + rbuf, 1, MPI_UNSIGNED_LONG, module->comm, module->comm->c_coll.coll_allgather_module); if (OMPI_SUCCESS != ret) return ret;