mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
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.
This commit is contained in:
parent
baeaf8821d
commit
9731c412e9
1 changed files with 11 additions and 1 deletions
|
@ -1247,6 +1247,10 @@ (define-public petsc
|
|||
(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 @@ (define-public petsc
|
|||
(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 @@ (define-public slepc
|
|||
#: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
|
||||
|
|
Loading…
Reference in a new issue