Skip to content

Commit 49ca7e6

Browse files
authored
Merge pull request #12828 from janjust/v5.0.x
accelecrator/cuda: fix for unresolved symbol
2 parents 75795c0 + 53b9f4a commit 49ca7e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opal/mca/accelerator/cuda/accelerator_cuda_component.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
/* Define global variables, used in accelerator_cuda.c */
3737
CUstream opal_accelerator_cuda_memcpy_stream = NULL;
3838
opal_mutex_t opal_accelerator_cuda_stream_lock = {0};
39+
int opal_accelerator_cuda_num_devices = 0;
3940

4041
/* Initialization lock for delayed cuda initialization */
4142
static opal_mutex_t accelerator_cuda_init_lock;
@@ -137,6 +138,8 @@ int opal_accelerator_cuda_delayed_init()
137138
goto out;
138139
}
139140

141+
cuDeviceGetCount(&opal_accelerator_cuda_num_devices);
142+
140143
/* Check to see if this process is running in a CUDA context. If
141144
* so, all is good. If not, then disable registration of memory. */
142145
result = cuCtxGetCurrent(&cuContext);

0 commit comments

Comments
 (0)