Yeah, that code is completely wrong. I have a fix in my btl modifications branch.
https://github.com/hjelmn/ompi/commit/38e961193074d382983d000e68adb721aaf3df7d -Nathan On Fri, Dec 12, 2014 at 08:26:34AM -0800, Ralph Castain wrote: > 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 > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/12/16546.php
pgpR5ISHjwGgq.pgp
Description: PGP signature