@@ -371,7 +371,7 @@ static int accelerator_cuda_memcpy(int dest_dev_id, int src_dev_id, void *dest,
371
371
{
372
372
CUresult result ;
373
373
374
- delayed_init = opal_accelerator_cuda_delayed_init ();
374
+ int delayed_init = opal_accelerator_cuda_delayed_init ();
375
375
if (OPAL_UNLIKELY (0 != delayed_init )) {
376
376
return delayed_init ;
377
377
}
@@ -462,7 +462,7 @@ static int accelerator_cuda_mem_alloc(int dev_id, void **ptr, size_t size)
462
462
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
463
463
opal_show_help ("help-accelerator-cuda.txt" , "cuMemAlloc failed" , true,
464
464
OPAL_PROC_MY_HOSTNAME , result );
465
- return result ;
465
+ return OPAL_ERROR ;
466
466
}
467
467
}
468
468
return 0 ;
@@ -476,7 +476,7 @@ static int accelerator_cuda_mem_release(int dev_id, void *ptr)
476
476
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
477
477
opal_show_help ("help-accelerator-cuda.txt" , "cuMemFree failed" , true,
478
478
OPAL_PROC_MY_HOSTNAME , result );
479
- return result ;
479
+ return OPAL_ERROR ;
480
480
}
481
481
}
482
482
return 0 ;
@@ -525,7 +525,7 @@ static int accelerator_cuda_host_register(int dev_id, void *ptr, size_t size)
525
525
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
526
526
opal_show_help ("help-accelerator-cuda.txt" , "cuMemHostRegister failed" , true,
527
527
ptr , size , OPAL_PROC_MY_HOSTNAME , result );
528
- return result ;
528
+ return OPAL_ERROR ;
529
529
}
530
530
531
531
return OPAL_SUCCESS ;
@@ -539,7 +539,7 @@ static int accelerator_cuda_host_unregister(int dev_id, void *ptr)
539
539
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
540
540
opal_show_help ("help-accelerator-cuda.txt" , "cuMemHostUnregister failed" , true,
541
541
ptr , OPAL_PROC_MY_HOSTNAME , result );
542
- return result ;
542
+ return OPAL_ERROR ;
543
543
}
544
544
}
545
545
return OPAL_SUCCESS ;
@@ -563,7 +563,7 @@ static int accelerator_cuda_get_device(int *dev_id)
563
563
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
564
564
opal_show_help ("help-accelerator-cuda.txt" , "cuCtxGetDevice failed" , true,
565
565
result );
566
- return result ;
566
+ return OPAL_ERROR ;
567
567
}
568
568
* dev_id = cuDev ;
569
569
return 0 ;
@@ -586,7 +586,7 @@ static int accelerator_cuda_device_can_access_peer(int *access, int dev1, int de
586
586
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
587
587
opal_show_help ("help-accelerator-cuda.txt" , "cuDeviceCanAccessPeer failed" , true,
588
588
OPAL_PROC_MY_HOSTNAME , result );
589
- return result ;
589
+ return OPAL_ERROR ;
590
590
}
591
591
return 0 ;
592
592
}
@@ -612,14 +612,14 @@ static int accelerator_cuda_get_buffer_id(int dev_id, const void *addr, opal_acc
612
612
if (OPAL_UNLIKELY (result != CUDA_SUCCESS )) {
613
613
opal_show_help ("help-accelerator-cuda.txt" , "bufferID failed" , true, OPAL_PROC_MY_HOSTNAME ,
614
614
result );
615
- return result ;
615
+ return OPAL_ERROR ;
616
616
}
617
617
result = cuPointerSetAttribute (& enable , CU_POINTER_ATTRIBUTE_SYNC_MEMOPS ,
618
618
(CUdeviceptr ) addr );
619
619
if (OPAL_UNLIKELY (CUDA_SUCCESS != result )) {
620
620
opal_show_help ("help-accelerator-cuda.txt" , "cuPointerSetAttribute failed" , true,
621
621
OPAL_PROC_MY_HOSTNAME , result , addr );
622
- return result ;
622
+ return OPAL_ERROR ;
623
623
}
624
624
return OPAL_SUCCESS ;
625
625
}
0 commit comments