summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2017-08-08 00:21:20 -0500
committerEric Bavier <bavier@member.fsf.org>2017-08-09 01:56:53 -0500
commit9731c412e9ef2fad66181460e768b01cb3c600da (patch)
treee6fc6e99e9e04465a62b35b2d610bdfe0fa3e03c /gnu/packages
parentbaeaf8821d24cce25b1ecf4a58496ec59545a2d5 (diff)
downloadguix-9731c412e9ef2fad66181460e768b01cb3c600da.tar.gz
gnu: petsc, slepc: Use 'parallel-job-count'.
* gnu/packages/maths.scm (petsc, slepc)[arguments]: Set #:make-flags to
override default unlimited '-j'.
(petsc)[arguments]: Scrub build machine cores from installed files in
'clean-local-references' phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 54db44b3df..cc9a9a40a8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1247,6 +1247,10 @@ September 2004}")
                          (assoc-ref %build-inputs "superlu") "/include")
          ,(string-append "--with-superlu-lib="
                          (assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a"))
+       #:make-flags
+       ;; Honor (parallel-job-count) for build.  Do not use --with-make-np,
+       ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
+       (list (format #f "MAKE_NP=~a" (parallel-job-count)))
        #:phases
        (modify-phases %standard-phases
         (replace 'configure
@@ -1261,13 +1265,17 @@ September 2004}")
               (format #t "configure flags: ~s~%" flags)
               (zero? (apply system* "./configure" flags)))))
         (add-after 'configure 'clean-local-references
-          (lambda* (#:key inputs outputs #:allow-other-keys)
+          (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
                 ;; Prevent build directory from leaking into compiled code
                 (((getcwd)) out)
                 ;; Scrub timestamp for reproducibility
                 ((".*Libraries compiled on.*") ""))
+              (substitute* (find-files "." "petscvariables")
+                ;; Do not expose build machine characteristics, set to defaults.
+                (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
+                (("NPMAX = [:digit:]+") "NPMAX = 2"))
               #t)))
         (add-after 'install 'clean-install
           ;; Try to keep installed files from leaking build directory names.
@@ -1364,6 +1372,8 @@ scientific applications modeled by partial differential equations.")
        #:configure-flags
        `(,(string-append "--with-arpack-dir="
                          (assoc-ref %build-inputs "arpack") "/lib"))
+       #:make-flags                     ;honor (parallel-job-count)
+       `(,(format #f "MAKE_NP=~a" (parallel-job-count)))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure