Skip to content

Commit bbe134d

Browse files
Rolf vandeVaarthjelmn
authored andcommitted
Disable the use of osc rdma when we detect a GPU buffer as it is not supported in that component.
This forces a failover to the osc pt2pt component. Fixes open-mpi#1012 (cherry picked from open-mpi/ompi@87a4cc6)
1 parent b3b8f62 commit bbe134d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
1515
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
1616
* Copyright (c) 2012-2015 Sandia National Laboratories. All rights reserved.
17+
* Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
1718
* $COPYRIGHT$
1819
*
1920
* Additional copyrights may follow
@@ -37,6 +38,9 @@
3738
#include "opal/threads/mutex.h"
3839
#include "opal/util/arch.h"
3940
#include "opal/align.h"
41+
#if OPAL_CUDA_SUPPORT
42+
#include "opal/datatype/opal_datatype_cuda.h"
43+
#endif /* OPAL_CUDA_SUPPORT */
4044

4145
#include "ompi/info/info.h"
4246
#include "ompi/communicator/communicator.h"
@@ -303,6 +307,15 @@ static int ompi_osc_rdma_component_query (struct ompi_win_t *win, void **base, s
303307
return -1;
304308
}
305309

310+
#if OPAL_CUDA_SUPPORT
311+
/* GPU buffers are not supported by the rdma component */
312+
if (MPI_WIN_FLAVOR_CREATE == flavor) {
313+
if (opal_cuda_check_bufs(*base, NULL)) {
314+
return -1;
315+
}
316+
}
317+
#endif /* OPAL_CUDA_SUPPORT */
318+
306319
if (OMPI_SUCCESS != ompi_osc_rdma_query_btls (comm, NULL)) {
307320
return -1;
308321
}

0 commit comments

Comments
 (0)