Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r2975
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2010-12-22 03:36:05


I'll backport this in 1.1 later, in case somebody wants to fix the
English speaking.

Brice

Le 22/12/2010 09:28, bgoglin_at_[hidden] a écrit :
> Author: bgoglin
> Date: 2010-12-22 03:28:55 EST (Wed, 22 Dec 2010)
> New Revision: 2975
> URL: https://svn.open-mpi.org/trac/hwloc/changeset/2975
>
> Log:
> Add a FAQ entry about HWLOC_API_VERSION
> Text files modified:
> trunk/doc/hwloc.doxy | 36 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 36 insertions(+), 0 deletions(-)
>
> Modified: trunk/doc/hwloc.doxy
> ==============================================================================
> --- trunk/doc/hwloc.doxy (original)
> +++ trunk/doc/hwloc.doxy 2010-12-22 03:28:55 EST (Wed, 22 Dec 2010)
> @@ -1294,5 +1294,41 @@
> (that may for instance be transmitted between applications through a socket).
>
>
> +\section faq_upgrade How do I handle API upgrades?
> +
> +The hwloc interface is extended with every new major release.
> +Any application using the hwloc API should be prepared to check at
> +compile-time whether some features are available in the currently
> +installed hwloc distribution.
> +
> +To check whether hwloc is at least 1.1, you should use:
> +\verbatim
> +#include <hwloc.h>
> +#if HWLOC_API_VERSION >= 0x00010100
> +...
> +#endif
> +\endverbatim
> +
> +One of the major changes in hwloc 1.1 is the addition of the bitmap
> +API. It supersedes the now deprecated cpuset API which will be removed
> +in a future hwloc release. It is strongly recommended to switch existing
> +codes to the bitmap API. Keeping support for older hwloc versions is easy.
> +For instance, if your code uses <tt>hwloc_cpuset_alloc</tt>, you should use
> +<tt>hwloc_bitmap_alloc</tt> instead and add the following code to one of your
> +common headers:
> +\verbatim
> +#include <hwloc.h>
> +#if HWLOC_API_VERSION < 0x00010100
> +#define hwloc_bitmap_alloc hwloc_cpuset_alloc
> +#endif
> +\endverbatim
> +
> +Similarly, the hwloc 1.0 interface may be detected by comparing
> +<tt>HWLOC_API_VERSION</tt> with <tt>0x00010000</tt>.
> +
> +hwloc 0.9 did not define any <tt>HWLOC_API_VERSION</tt> but this very old
> +release probably does not deserve support from your application anymore.
> +
> +
>
> */
> _______________________________________________
> hwloc-svn mailing list
> hwloc-svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-svn
>