Skip to content

Commit dfde70f

Browse files
author
Luke Robison
committed
OSC/RDMA: Prevent BTL from handling DATA_COMPLEX ops
The BTL has no ability to handle complex types, and so this routine should exit early just as it does for non 32-bit or 64-bit operations. In particular, a fetch-and-op on an MPI_FLOAT_COMPLEX type would have previously been routed to BTL and then silently ignored. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent 37de229 commit dfde70f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ static int ompi_osc_rdma_fetch_and_op_atomic (ompi_osc_rdma_sync_t *sync, const
237237

238238
if ((8 != extent && !((MCA_BTL_ATOMIC_SUPPORTS_32BIT & module->atomic_flags) && 4 == extent)) ||
239239
(!(OMPI_DATATYPE_FLAG_DATA_INT & dt->super.flags) && !(MCA_BTL_ATOMIC_SUPPORTS_FLOAT & module->atomic_flags)) ||
240+
((OMPI_DATATYPE_FLAG_DATA_COMPLEX & dt->super.flags) == OMPI_DATATYPE_FLAG_DATA_COMPLEX) ||
240241
!ompi_op_is_intrinsic (op) || (0 == ompi_osc_rdma_op_mapping[op->op_type])) {
241242
return OMPI_ERR_NOT_SUPPORTED;
242243
}
@@ -330,6 +331,7 @@ static int ompi_osc_rdma_acc_single_atomic (ompi_osc_rdma_sync_t *sync, const vo
330331

331332
if ((8 != extent && !((MCA_BTL_ATOMIC_SUPPORTS_32BIT & module->atomic_flags) && 4 == extent)) ||
332333
(!(OMPI_DATATYPE_FLAG_DATA_INT & dt->super.flags) && !(MCA_BTL_ATOMIC_SUPPORTS_FLOAT & module->atomic_flags)) ||
334+
((OMPI_DATATYPE_FLAG_DATA_COMPLEX & dt->super.flags) == OMPI_DATATYPE_FLAG_DATA_COMPLEX) ||
333335
!ompi_op_is_intrinsic (op) || (0 == ompi_osc_rdma_op_mapping[op->op_type])) {
334336
return OMPI_ERR_NOT_SUPPORTED;
335337
}

0 commit comments

Comments
 (0)