1
1

Fix Coverity CIDs 1341584-1341589.

Этот коммит содержится в:
George Bosilca 2015-12-06 14:06:36 -05:00
родитель 10db7ebfab
Коммит 3a9664ac9d
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -170,7 +170,7 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
char *free_buf = NULL, *shift_buf = NULL;
ptrdiff_t span, gap;
span = opal_datatype_span(&rdtype->super, (size - rank) * rcount, &gap);
span = opal_datatype_span(&rdtype->super, (int64_t)(size - rank) * rcount, &gap);
free_buf = (char*)calloc(span, sizeof(char));
if (NULL == free_buf) {

Просмотреть файл

@ -219,7 +219,7 @@ int ompi_coll_base_alltoall_intra_bruck(const void *sbuf, int scount,
err = ompi_datatype_type_extent (rdtype, &rext);
if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; }
span = opal_datatype_span(&sdtype->super, size * scount, &gap);
span = opal_datatype_span(&sdtype->super, (int64_t)size * scount, &gap);
displs = (int *) malloc(size * sizeof(int));
if (displs == NULL) { line = __LINE__; err = -1; goto err_hndl; }

Просмотреть файл

@ -66,8 +66,8 @@ ompi_coll_base_gather_intra_binomial(const void *sbuf, int scount,
ompi_datatype_type_extent(sdtype, &sextent);
ompi_datatype_type_extent(rdtype, &rextent);
ssize = opal_datatype_span(&sdtype->super, scount * size, &sgap);
rsize = opal_datatype_span(&rdtype->super, rcount * size, &rgap);
ssize = opal_datatype_span(&sdtype->super, (int64_t)scount * size, &sgap);
rsize = opal_datatype_span(&rdtype->super, (int64_t)rcount * size, &rgap);
vrank = (rank - root + size) % size;

Просмотреть файл

@ -65,8 +65,8 @@ ompi_coll_base_scatter_intra_binomial( const void *sbuf, int scount,
ompi_datatype_type_extent(sdtype, &sextent);
ompi_datatype_type_extent(rdtype, &rextent);
ssize = opal_datatype_span(&sdtype->super, scount * size, &sgap);
rsize = opal_datatype_span(&rdtype->super, rcount * size, &rgap);
ssize = opal_datatype_span(&sdtype->super, (int64_t)scount * size, &sgap);
rsize = opal_datatype_span(&rdtype->super, (int64_t)rcount * size, &rgap);
vrank = (rank - root + size) % size;
ptmp = (char *) rbuf; /* by default suppose leaf nodes, just use rbuf */