diff --git a/ompi/mca/btl/openib/btl_openib_mca.c b/ompi/mca/btl/openib/btl_openib_mca.c index b7c8d0acc0..02aa2b869a 100644 --- a/ompi/mca/btl/openib/btl_openib_mca.c +++ b/ompi/mca/btl/openib/btl_openib_mca.c @@ -793,6 +793,20 @@ int btl_openib_verify_mca_params (void) } else { mca_btl_openib_module.super.btl_flags &= ~MCA_BTL_FLAGS_CUDA_COPY_ASYNC_RECV; } + /* Cannot have fork support and GDR on at the same time. If the user asks for both, + * then print a message and return error. If the user does not explicitly ask for + * fork support, then turn it off in the presence of GDR. */ + if (mca_btl_openib_component.cuda_want_gdr && mca_btl_openib_component.cuda_have_gdr && + mca_btl_openib_component.driver_have_gdr) { + if (1 == mca_btl_openib_component.want_fork_support) { + opal_show_help("help-mpi-btl-openib.txt", "no_fork_with_gdr", + true, ompi_process_info.nodename); + return OMPI_ERR_BAD_PARAM; + } + if (-1 == mca_btl_openib_component.want_fork_support) { + mca_btl_openib_component.want_fork_support = 0; + } + } #endif #if BTL_OPENIB_MALLOC_HOOKS_ENABLED diff --git a/ompi/mca/btl/openib/help-mpi-btl-openib.txt b/ompi/mca/btl/openib/help-mpi-btl-openib.txt index def806ec89..68800c6dfd 100644 --- a/ompi/mca/btl/openib/help-mpi-btl-openib.txt +++ b/ompi/mca/btl/openib/help-mpi-btl-openib.txt @@ -723,3 +723,8 @@ installation does not have that support. Contact Mellanox to figure out how to get an OFED stack with that support. Local host: %s +[no_fork_with_gdr] +You cannot have fork support and CUDA GPU Direct RDMA support on at +the same time. Please disable one of them. + + Local host: %s