Skip to content

Commit cf3ba70

Browse files
committed
btl/openib: Disqualify rdmacm CPC if MPI_THREAD_MULTIPLE
The rdmacm CPC in the openib BTL is not thread safe. The rdmacm CPC should disqualify itself (instead of failing in random ways) if MPI_THREAD_MULTIPLE is the thread level. Signed-off-by: Potnuri Bharat Teja <[email protected]>
1 parent 8a92aa4 commit cf3ba70

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,15 @@ static int rdmacm_component_query(mca_btl_openib_module_t *openib_btl, opal_btl_
20032003
struct sockaddr_in sin;
20042004
#endif
20052005

2006+
/* RDMACM is not supported for MPI_THREAD_MULTIPLE */
2007+
if (opal_using_threads()) {
2008+
BTL_VERBOSE(("rdmacm CPC is not supported with MPI_THREAD_MULTIPLE; skipped on %s:%d",
2009+
ibv_get_device_name(openib_btl->device->ib_dev),
2010+
openib_btl->port_num));
2011+
rc = OPAL_ERR_NOT_SUPPORTED;
2012+
goto out;
2013+
}
2014+
20062015
/* RDMACM is not supported if we have any XRC QPs */
20072016
if (mca_btl_openib_component.num_xrc_qps > 0) {
20082017
BTL_VERBOSE(("rdmacm CPC not supported with XRC receive queues, please try xoob CPC; skipped on %s:%d",

0 commit comments

Comments
 (0)