diff --git a/opal/mca/maffinity/libnuma/configure.m4 b/opal/mca/maffinity/libnuma/configure.m4 index 253d6cb9f3..7f1bf247b7 100644 --- a/opal/mca/maffinity/libnuma/configure.m4 +++ b/opal/mca/maffinity/libnuma/configure.m4 @@ -10,6 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyright (c) 2008 Cisco systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -52,8 +53,13 @@ AC_DEFUN([MCA_maffinity_libnuma_CONFIG],[ [AS_IF([test "$with_libnuma" != "no" -a ! -z "$with_libnuma"], [AC_MSG_ERROR([maffinity:libnuma requested but not found. Aborting])])]) - # substitute in the things needed to build gm + # Check for MPOL_MF_MOVE + AS_IF([test "$maffinity_libnuma_happy" = "yes"], + [AC_CHECK_DECLS([MPOL_MF_MOVE])]) + + # substitute in the things needed to build libnuma AC_SUBST([maffinity_libnuma_CPPFLAGS]) AC_SUBST([maffinity_libnuma_LDFLAGS]) AC_SUBST([maffinity_libnuma_LIBS]) ])dnl +> diff --git a/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c b/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c index b2b109ce04..b2547fa0fc 100644 --- a/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c +++ b/opal/mca/maffinity/libnuma/maffinity_libnuma_module.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -115,9 +116,16 @@ static int libnuma_modules_bind(opal_maffinity_base_segment_t *segs, for(i = 0; i < count; i++) { rc = mbind(segs[i].mbs_start_addr, segs[i].mbs_len, MPOL_PREFERRED, - &node_mask, sizeof(node_mask) * 8, MPOL_MF_MOVE); - if(rc != 0) + &node_mask, sizeof(node_mask) * 8, +#ifdef HAVE_MPOL_MF_MOVE + MPOL_MF_MOVE +#else + MPOL_MF_STRICT +#endif + ); + if (0 != rc) { return OPAL_ERROR; + } } return OPAL_SUCCESS;