btl/openib: fix segmentation fault
This commit fixes a segmentation fault that occurs if a device can be initialized but not used. In this case the devices_count is not equal to the number of usable devices in the devices pointer array. Thanks to @artpol84 for tracking this down. Fixes open-mpi/ompi#1823 Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
679a66ccc8
Коммит
8128c8eb29
@ -3771,8 +3771,10 @@ static int btl_openib_component_progress(void)
|
||||
for(i = 0; i < mca_btl_openib_component.devices_count; i++) {
|
||||
mca_btl_openib_device_t *device =
|
||||
(mca_btl_openib_device_t *) opal_pointer_array_get_item(&mca_btl_openib_component.devices, i);
|
||||
if (NULL != device) {
|
||||
count += progress_one_device(device);
|
||||
}
|
||||
}
|
||||
|
||||
#if OPAL_CUDA_SUPPORT /* CUDA_ASYNC_SEND */
|
||||
/* Check to see if there are any outstanding dtoh CUDA events that
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user