Skip to content

Commit dad058e

Browse files
authored
Merge pull request #11385 from hppritcha/smcuda_cray_cce_fix
btl/smcuda: fix for cray llvm compiler
2 parents f6f748a + 61a4cff commit dad058e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opal/mca/btl/smcuda/btl_smcuda.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
2222
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
2323
* Copyright (c) 2022 IBM Corporation. All rights reserved
24+
* Copyright (c) 2023 Triad National Security, LLC. All rights
25+
* reserved.
2426
* $COPYRIGHT$
2527
*
2628
* Additional copyrights may follow
@@ -355,8 +357,8 @@ static int smcuda_btl_first_time_init(mca_btl_smcuda_t *smcuda_btl, int32_t my_s
355357
"btl:smcuda: CUDA cuMemHostRegister address=%p, size=%d",
356358
mca_btl_smcuda_component.sm_mpool_base, (int) res->size);
357359
if (0 == strcmp(opal_accelerator_base_selected_component.base_version.mca_component_name, "cuda")) {
358-
res = opal_accelerator.host_register(MCA_ACCELERATOR_NO_DEVICE_ID, mca_btl_smcuda_component.sm_mpool_base, res->size);
359-
if (OPAL_UNLIKELY(OPAL_SUCCESS != res)) {
360+
rc = opal_accelerator.host_register(MCA_ACCELERATOR_NO_DEVICE_ID, mca_btl_smcuda_component.sm_mpool_base, res->size);
361+
if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
360362
/* If registering the memory fails, print a message and continue.
361363
* This is not a fatal error. */
362364
opal_output_verbose(10, opal_btl_base_framework.framework_output,

0 commit comments

Comments
 (0)