Skip to content

Commit

Permalink
Merge pull request #5680 from ggouaillardet/topic/nbc_unpack
Browse files Browse the repository at this point in the history
coll/libnbc: fix NBC_Unpack()
  • Loading branch information
bosilca committed Sep 19, 2018
2 parents 2ae3cfd + ff48e92 commit 441727f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ompi/mca/coll/libnbc/nbc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,18 @@ static inline int NBC_Unpack(void *src, int srccount, MPI_Datatype srctype, void
int res;
ptrdiff_t ext, lb;

res = ompi_datatype_pack_external_size("external32", srccount, srctype, &size);
if (OMPI_SUCCESS != res) {
NBC_Error ("MPI Error in ompi_datatype_pack_external_size() (%i)", res);
return res;
}
#if OPAL_CUDA_SUPPORT
if(NBC_Type_intrinsic(srctype) && !(opal_cuda_check_bufs((char *)tgt, (char *)src))) {
#else
if(NBC_Type_intrinsic(srctype)) {
#endif /* OPAL_CUDA_SUPPORT */
/* if we have the same types and they are contiguous (intrinsic
* types are contiguous), we can just use a single memcpy */
res = ompi_datatype_pack_external_size("external32", srccount, srctype, &size);
res = ompi_datatype_get_extent (srctype, &lb, &ext);
if (OMPI_SUCCESS != res) {
NBC_Error ("MPI Error in MPI_Type_extent() (%i)", res);
Expand Down

0 comments on commit 441727f

Please sign in to comment.