[commit: ghc] master: rts: configure.ac should populate HAVE_LIBNUMA instead of USE_LIBNUMA (1050e46)

git at git.haskell.org git at git.haskell.org
Sat Oct 22 19:30:19 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1050e46b5b1640a475fa2fa67616cda8d31308e2/ghc

>---------------------------------------------------------------

commit 1050e46b5b1640a475fa2fa67616cda8d31308e2
Author: Darshan Kapashi <darshan at fb.com>
Date:   Fri Oct 21 12:03:19 2016 -0400

    rts: configure.ac should populate HAVE_LIBNUMA instead of USE_LIBNUMA
    
    Code in rts/ which deals with numa checks for `#if HAVE_LIBNUMA`,
    however this macro is not populated during `./configure`.
    https://phabricator.haskell.org/D2329 changed this code last and we
    instead set `USE_LIBNUMA` which fails to setup numa correctly.
    
    Test Plan:
    From main directory in ghc,
    
      ./configure && make clean && make boot && make
      cd nofib/parallel/queens
      ../../../inplace/bin/ghc-stage2 Main.hs -rtsopts -threaded
      ./Main 15 +RTS -N24 -s -A64m --numa
    
    This fails before this patch with
    
      Main: --numa: OS reports NUMA is not available
    
    After the fix, it works as expected.
    
    Run the validation script,
    
      ./validate
    
    (It fails with an error in `compiler/utils/Util.hs` saying
    `GHC.Stack.CallStack` not found, once I remove this 1 line from this
    file , the script works)
    
    Reviewers: hvr, austin, bgamari, erikd, simonmar
    
    Reviewed By: erikd, simonmar
    
    Subscribers: mpickering, thomie, erikd, niteria
    
    Differential Revision: https://phabricator.haskell.org/D2620
    
    GHC Trac Issues: #12741


>---------------------------------------------------------------

1050e46b5b1640a475fa2fa67616cda8d31308e2
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 629624a..5decd24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1070,7 +1070,7 @@ AC_CHECK_HEADERS([numa.h numaif.h])
 if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
     AC_CHECK_LIB(numa, numa_available,HaveLibNuma=1)
 fi
-AC_DEFINE_UNQUOTED([USE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma])
+AC_DEFINE_UNQUOTED([HAVE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma])
 
 dnl ** Documentation
 dnl --------------------------------------------------------------



More information about the ghc-commits mailing list