Hey folks
I’ve been looking into this warning:
btl_openib_component.c: In function 'init_one_device':
btl_openib_component.c:2019:54: warning: comparison between 'enum <anonymous>'
and 'mca_base_var_source_t' [-Wenum-compare]
else if (BTL_OPENIB_RQ_SOURCE_DEVICE_INI ==
^
This warning is really valid - the equality can *never* be true. Essentially,
someone defined two enum types, and is now trying to check if one is equal to
the other. This is the code block under concern:
else if (BTL_OPENIB_RQ_SOURCE_DEVICE_INI ==
mca_btl_openib_component.receive_queues_source) {
opal_show_help("help-mpi-btl-openib.txt",
"locally conflicting receive_queues", true,
opal_install_dirs.opaldatadir,
opal_process_info.nodename,
ibv_get_device_name(receive_queues_device->ib_dev),
receive_queues_device->ib_dev_attr.vendor_id,
receive_queues_device->ib_dev_attr.vendor_part_id,
mca_btl_openib_component.receive_queues,
ibv_get_device_name(device->ib_dev),
device->ib_dev_attr.vendor_id,
device->ib_dev_attr.vendor_part_id,
mca_btl_openib_component.default_recv_qps);
ret = OPAL_ERR_RESOURCE_BUSY;
goto error;
}
BTL_OPENIB_RQ_SOURCE_DEVICE_INI is defined as an enum in the openib code. The
receive_queues_source field is an MCA base enum that indicates the source of
the param. In this case, it is indicating that the source was a file, but says
nothing about which file.
I don’t want to step on toes to fix this, but the code clearly is wrong. Can
someone please fix it? It’s in the master as well as in the 1.8 branch
Thanks
Ralph