Mercury Bugs - mercury
View Issue Details
0000289mercuryBugpublic2013-06-18 23:592014-02-04 12:34
Reporterkeri 
Assigned Topbone 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000289: hwloc deprecated functions used in Mercury runtime
DescriptionWith >=hwloc-1.5.x installed, the following warnings may occur when compiling some grades:

mercury_context2.c: In function 'MR_setup_thread_pinning':
mercury_context2.c:467:5: warning: implicit declaration of function 'hwloc_cpuset_weight' [-Wimplicit-function-declaration]
mercury_context2.c: In function 'MR_do_pin_thread':
mercury_context2.c:549:5: warning: implicit declaration of function 'hwloc_cpuset_iszero' [-Wimplicit-function-declaration]
mercury_context2.c:559:5: warning: implicit declaration of function 'hwloc_cpuset_intersects' [-Wimplicit-function-declaration]
mercury_context2.c: In function 'MR_reset_available_cpus':
mercury_context2.c:614:5: warning: implicit declaration of function 'hwloc_cpuset_alloc' [-Wimplicit-function-declaration]
mercury_context2.c:614:23: warning: assignment makes pointer from integer without a cast [enabled by default]
mercury_context2.c:624:29: warning: assignment makes pointer from integer without a cast [enabled by default]
mercury_context2.c:626:5: warning: implicit declaration of function 'hwloc_cpuset_and' [-Wimplicit-function-declaration]
mercury_context2.c:629:5: warning: implicit declaration of function 'hwloc_cpuset_free' [-Wimplicit-function-declaration]
mercury_context2.c: In function 'MR_make_pu_unavailable':
mercury_context2.c:696:5: warning: implicit declaration of function 'hwloc_cpuset_andnot' [-Wimplicit-function-declaration]


The "assignment makes pointer from integer without a cast" warnings indicate that the compiled code could lead to crashes on 64 bit.


These warning are due to the hwloc_cpuset functions being declared deprecated in v1.1.0 and finally removed in v1.5.0:

Version 1.1.0
-------------

* API
  + The cpuset API (hwloc/cpuset.h) is now deprecated. It is replaced by
    the bitmap API (hwloc/bitmap.h) which offers the same features with more
    generic names since it applies to CPU sets, node sets and more.
    Backward compatibility with the cpuset API and ABI is still provided but
    it will be removed in a future release.
    Old types (hwloc_cpuset_t, ...) are still available as a way to clarify
    what kind of hwloc_bitmap_t each API function manipulates.
    Upgrading to the new API only requires to replace hwloc_cpuset_ function
    calls with the corresponding hwloc_bitmap_ calls, with the following
    renaming exceptions:
    - hwloc_cpuset_cpu -> hwloc_bitmap_only
    - hwloc_cpuset_all_but_cpu -> hwloc_bitmap_allbut
    - hwloc_cpuset_from_string -> hwloc_bitmap_sscanf
TagsNo tags attached.
Attached Files

Notes
(0000539)
pbone   
2013-06-19 11:06   
Hi Keri,

Thanks for this, and for providing the helpful information. I'll look into it as time permits. If you want to compile these grades in the short term you can disable hwloc support (pretty sure there's a configure switch), Mercury will fallback to using set_cpuaffinity() for thread pinning.
(0000638)
pbone   
2014-02-04 12:34   
Fixed in the version-14_01-branch branch at f6c00fb.

Thanks.

Issue History
2013-06-18 23:59keriNew Issue
2013-06-19 11:06pboneNote Added: 0000539
2013-06-19 11:06pboneAssigned To => pbone
2013-06-19 11:06pboneStatusnew => assigned
2014-02-04 12:34pboneNote Added: 0000638
2014-02-04 12:34pboneStatusassigned => closed
2014-02-04 12:34pboneResolutionopen => fixed