Skip to content

Commit d15c0e8

Browse files
committed
pml/cm: fix a problem introduced with cuda support
PR #8536 introduced a regression in non-cuda environments when an application is using derived, but continguous datatypes. Related to #8905. Signed-off-by: Howard Pritchard <[email protected]>
1 parent 02b2010 commit d15c0e8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ompi/mca/pml/cm/pml_cm_sendreq.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Copyright (c) 2015 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2017 Intel, Inc. All rights reserved
18+
* Copyright (c) 2021 Triad National Security, LLC. All rights
19+
* reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -31,6 +33,7 @@
3133
#include "ompi/mca/pml/pml.h"
3234
#include "ompi/mca/mtl/mtl.h"
3335
#include "opal/prefetch.h"
36+
#include "opal/runtime/opal_params.h"
3437

3538
struct mca_pml_cm_send_request_t {
3639
mca_pml_cm_request_t req_base;
@@ -247,9 +250,11 @@ do { \
247250
MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count); \
248251
(req_send)->req_base.req_convertor.flags |= flags; \
249252
/* Sets CONVERTOR_CUDA flag if CUDA buffer */ \
250-
opal_convertor_prepare_for_send( \
251-
&req_send->req_base.req_convertor, \
252-
&datatype->super, count, buf ); \
253+
if (opal_built_with_cuda_support) { \
254+
opal_convertor_prepare_for_send( \
255+
&req_send->req_base.req_convertor, \
256+
&datatype->super, count, buf ); \
257+
} \
253258
} else { \
254259
MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count); \
255260
opal_convertor_copy_and_prepare_for_send( \

0 commit comments

Comments
 (0)