Skip to content

Commit f9ad7bf

Browse files
committed
Add missing "#if OPAL_CUDA_GDR_SUPPORT" protection.
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
1 parent 918fe01 commit f9ad7bf

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

ompi/mca/pml/ob1/pml_ob1_cuda.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ size_t mca_pml_ob1_rdma_cuda_btls(
127127
if( NULL != bml_btl->btl->btl_register_mem ) {
128128
/* register the memory */
129129
handle = bml_btl->btl->btl_register_mem (bml_btl->btl, bml_btl->btl_endpoint,
130-
base, size, MCA_BTL_REG_FLAG_CUDA_GPU_MEM |
130+
base, size,
131+
#if OPAL_CUDA_GDR_SUPPORT
132+
MCA_BTL_REG_FLAG_CUDA_GPU_MEM |
133+
#endif
131134
MCA_BTL_REG_FLAG_REMOTE_READ);
132135
}
133136

opal/mca/btl/smcuda/btl_smcuda.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,9 +1006,11 @@ mca_btl_smcuda_register_mem(struct mca_btl_base_module_t *btl,
10061006
int access_flags = flags & MCA_BTL_REG_FLAG_ACCESS_ANY;
10071007
int rcache_flags = 0;
10081008

1009+
#if OPAL_CUDA_GDR_SUPPORT
10091010
if (MCA_BTL_REG_FLAG_CUDA_GPU_MEM & flags) {
10101011
rcache_flags |= MCA_RCACHE_FLAGS_CUDA_GPU_MEM;
10111012
}
1013+
#endif
10121014

10131015
smcuda_module->rcache->rcache_register(smcuda_module->rcache, base, size, rcache_flags,
10141016
access_flags, (mca_rcache_base_registration_t **) &reg);

opal/mca/btl/smcuda/btl_smcuda_component.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,13 @@ static int smcuda_register(void)
212212
if (0 == mca_btl_smcuda.super.btl_cuda_max_send_size) {
213213
mca_btl_smcuda.super.btl_cuda_max_send_size = 128 * 1024;
214214
}
215+
#if OPAL_CUDA_GDR_SUPPORT
215216
/* If user has not set the value, then set to magic number which will be converted to the
216217
* minimum size needed to fit the PML header (see pml_ob1.c) */
217218
if (0 == mca_btl_smcuda.super.btl_cuda_eager_limit) {
218219
mca_btl_smcuda.super.btl_cuda_eager_limit = SIZE_MAX; /* magic number */
219220
}
221+
#endif
220222
mca_common_cuda_register_mca_variables();
221223
#endif /* OPAL_CUDA_SUPPORT */
222224
return mca_btl_smcuda_component_verify();

0 commit comments

Comments
 (0)