[commit: ghc] master: Validate: explain THREADS instead of CPUS in --help (e3df1b1)

git at git.haskell.org git at git.haskell.org
Wed Jul 22 17:31:17 UTC 2015


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

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

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

commit e3df1b1e847fe3ae7793b2d56ff9976343d58985
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Wed Jul 22 01:34:17 2015 +0200

    Validate: explain THREADS instead of CPUS in --help


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

e3df1b1e847fe3ae7793b2d56ff9976343d58985
 .travis.yml |  2 +-
 validate    | 17 +++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 5c847da..f8829fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,4 +50,4 @@ script:
  - if [ "$DEBUG_STAGE2" = "YES" ]; then echo 'GhcStage2HcOpts += -DDEBUG' >> mk/validate.mk; fi
  # Don't use --quiet, as it might cause the testsuite to not print output for
  # over 10 minutes, causing Travis to kill our job.
- - CPUS=2 SKIP_PERF_TESTS=YES ./validate --fast
+ - THREADS=3 SKIP_PERF_TESTS=YES ./validate --fast
diff --git a/validate b/validate
index 57977fa..ab1cc01 100755
--- a/validate
+++ b/validate
@@ -20,17 +20,18 @@ Flags:
                     HTML generated here: testsuite/hpc_output/hpc_index.html
   --fast            Omit dyn way, omit binary distribution
   --slow            Build stage2 with -DDEBUG. Skips tests that call
-                    `compiler_stats_num_field`.
+                    compiler_stats_num_field.
                     2008-07-01: 14% slower than the default.
-  --dph:            Also build libraries/dph and run associated tests.
-  --quiet:          More pretty build log.
+  --dph             Also build libraries/dph and run associated tests.
+  --quiet           More pretty build log.
                     See Note [Default build system verbosity].
   --help            shows this usage help.
 
-  Set environment variable 'CPUS' to number of cores, to exploit
-  multiple cpu cores, e.g.
+  validate runs 'make -j\$THREADS', where by default THREADS is the number of
+  cpus your computer has +1. You can set the environment variable THREADS to
+  override this. For a sequential build you would for example use
 
-    CPUS=8 ./validate
+    THREADS=1 ./validate
 
 EOF
 }
@@ -121,8 +122,6 @@ detect_cpu_count () {
         # nothing helped
         CPUS="1"
     fi
-
-    echo "using ${CPUS} CPUs" >&2
 }
 
 detect_cpu_count
@@ -139,6 +138,8 @@ else
     threads="$THREADS"
 fi
 
+echo "using THREADS=${threads}" >&2
+
 if type gmake > /dev/null 2> /dev/null
 then
     make="gmake"



More information about the ghc-commits mailing list