Skip to content

Commit 8d9e60f

Browse files
Check if receive buffer is cuda before staging at root
Signed-off-by: Akshay Venkatesh <akshay.v.3.14@gmail.com>
1 parent 7cc326b commit 8d9e60f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/coll/cuda/coll_cuda_reduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mca_coll_cuda_reduce(const void *sbuf, void *rbuf, int count,
5555
sbuf = sbuf1 - gap;
5656
}
5757

58-
if (rank == root) {
58+
if ((rank == root) && (opal_cuda_check_bufs((char *)rbuf, NULL))) {
5959
rbuf1 = (char*)malloc(bufsize);
6060
if (NULL == rbuf1) {
6161
if (NULL != sbuf1) free(sbuf1);

0 commit comments

Comments
 (0)