Skip to content

Commit a76566c

Browse files
committed
osc/portals4: To allocate a PT, use REQ_OSC_TABLE_ID and test that the right ID is allocated
1 parent 0e433ea commit a76566c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ompi/mca/osc/portals4/osc_portals4.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#include "ompi/mca/mtl/portals4/mtl_portals4.h"
2323

24+
#define REQ_OSC_TABLE_ID 4
25+
2426
#define OSC_PORTALS4_MB_DATA 0x0000000000000000ULL
2527
#define OSC_PORTALS4_MB_CONTROL 0x1000000000000000ULL
2628

ompi/mca/osc/portals4/osc_portals4_component.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads)
305305
ret = PtlPTAlloc(mca_osc_portals4_component.matching_ni_h,
306306
0,
307307
mca_osc_portals4_component.matching_eq_h,
308-
4,
308+
REQ_OSC_TABLE_ID,
309309
&mca_osc_portals4_component.matching_pt_idx);
310310
if (PTL_OK != ret) {
311311
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
@@ -314,6 +314,13 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads)
314314
return ret;
315315
}
316316

317+
if (mca_osc_portals4_component.matching_pt_idx != REQ_OSC_TABLE_ID) {
318+
opal_output_verbose(1, ompi_osc_base_framework.framework_output,
319+
"%s:%d: PtlPTAlloc did not allocate the requested PT: %d\n",
320+
__FILE__, __LINE__, mca_osc_portals4_component.matching_pt_idx);
321+
return ret;
322+
}
323+
317324
OBJ_CONSTRUCT(&mca_osc_portals4_component.requests, opal_free_list_t);
318325
ret = opal_free_list_init (&mca_osc_portals4_component.requests,
319326
sizeof(ompi_osc_portals4_request_t),

0 commit comments

Comments
 (0)