This may fix the issue for newer versions of libnuma (2.0.x), but it breaks it 
for older versions (0.9.x -- which is what is shipped in RHEL4 and 5).  I'm 
thinking we're going to need a configure test for this.  Sigh.

#$%#@% libnuma!!!  :-(



On Feb 23, 2011, at 7:59 AM, rusra...@osl.iu.edu wrote:

> Author: rusraink
> Date: 2011-02-23 07:59:49 EST (Wed, 23 Feb 2011)
> New Revision: 24442
> URL: https://svn.open-mpi.org/trac/ompi/changeset/24442
> 
> Log:
> - Addendum to r24421: get mca_maffinity_libnuma to compile on linux
>   (with libnuma-2.0.4 / LIBNUMA_API_VERSION 2): numa_get_run_node_mask
>   returns a struct bitmask *.
> 
>   Whether it's a good idea to blindly pass that on to
>   numa_set_membind() is another matter: one might want to match against
>   the list returned by numa_get_mems_allowed(), which may be set by the
>   outside environment.
> 
>   Refs #2698.
> 
> 
> Text files modified: 
>   trunk/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c |     4 ++--    
>                                 
>   1 files changed, 2 insertions(+), 2 deletions(-)
> 
> Modified: trunk/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c
> ==============================================================================
> --- trunk/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c       
> (original)
> +++ trunk/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c       
> 2011-02-23 07:59:49 EST (Wed, 23 Feb 2011)
> @@ -69,7 +69,7 @@
> 
> static int libnuma_module_init(void)
> {
> -    nodemask_t mask;
> +    struct bitmask * mask;
> 
>     /* If we have a strict policy set, then bind all memory to this
>        numa node.  Note that maffinity won't be invoked unless the
> @@ -78,7 +78,7 @@
>        numa_get_run_node_mask(). */
>     if (MPOL_BIND == mca_maffinity_libnuma_component.libnuma_policy) {
>         mask = numa_get_run_node_mask();
> -        numa_set_membind(&mask);
> +        numa_set_membind(mask);
>     }
> 
>     /* We want libnuma to fail to alloc if it can't allocate on the
> _______________________________________________
> svn-full mailing list
> svn-f...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to