mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
gnu: hypre: Use gexps.
* gnu/packages/maths.scm (hypre)[arguments]: Use gexps. (hypre-openmpi)[arguments]: Likewise. Change-Id: I3064b7606b97076e2fb2947b1fb93319eeb184c9
This commit is contained in:
parent
6bf70cf9a6
commit
ed1b4f56fc
1 changed files with 60 additions and 57 deletions
|
@ -7222,59 +7222,63 @@ (define-public hypre
|
||||||
(inputs
|
(inputs
|
||||||
(list openblas))
|
(list openblas))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((srfi srfi-1)
|
(list #:modules `((srfi srfi-1)
|
||||||
,@%default-gnu-modules)
|
,@%default-gnu-modules)
|
||||||
#:configure-flags '("--enable-shared"
|
#:configure-flags #~'("--enable-shared"
|
||||||
"--disable-fortran"
|
"--disable-fortran"
|
||||||
"--without-MPI"
|
"--without-MPI"
|
||||||
"--with-openmp"
|
"--with-openmp"
|
||||||
"--with-fei"
|
"--with-fei"
|
||||||
"--with-lapack"
|
"--with-lapack"
|
||||||
"--with-blas")
|
"--with-blas")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'configure 'chdir-src
|
(add-before 'configure 'chdir-src
|
||||||
(lambda _ (chdir "src")))
|
(lambda _
|
||||||
(replace 'configure
|
(chdir "src")))
|
||||||
(lambda* (#:key build target configure-flags
|
(replace 'configure
|
||||||
|
(lambda* (#:key build target configure-flags
|
||||||
#:allow-other-keys #:rest args)
|
#:allow-other-keys #:rest args)
|
||||||
(let* ((configure (assoc-ref %standard-phases 'configure)))
|
(let* ((configure (assoc-ref %standard-phases 'configure)))
|
||||||
(apply configure
|
(apply configure
|
||||||
(append args
|
(append args
|
||||||
(list #:configure-flags
|
(list #:configure-flags
|
||||||
(cons (string-append
|
(cons (string-append "--host="
|
||||||
"--host=" (or target build))
|
(or target build))
|
||||||
configure-flags)))))))
|
configure-flags)))))))
|
||||||
(add-after 'build 'build-docs
|
(add-after 'build 'build-docs
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "make" "-C" "docs")))
|
(invoke "make" "-C" "docs")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(setenv "LD_LIBRARY_PATH"
|
(setenv "LD_LIBRARY_PATH"
|
||||||
(string-append (getcwd) "/hypre/lib"))
|
(string-append (getcwd) "/hypre/lib"))
|
||||||
(setenv "PATH"
|
(setenv "PATH"
|
||||||
(string-append "." ":"
|
(string-append "." ":" (getenv "PATH")))
|
||||||
(getenv "PATH")))
|
(invoke "make" "check" "CHECKRUN=")
|
||||||
(invoke "make" "check" "CHECKRUN=")
|
(for-each (lambda (filename)
|
||||||
(for-each (lambda (filename)
|
(let ((size (stat:size (stat filename))))
|
||||||
(let ((size (stat:size (stat filename))))
|
(when (positive? size)
|
||||||
(when (positive? size)
|
(error (format #f
|
||||||
(error (format #f
|
"~a size ~d; error indication~%"
|
||||||
"~a size ~d; error indication~%"
|
filename size)))))
|
||||||
filename size)))))
|
(find-files "test" ".*\\.err$")))))
|
||||||
(find-files "test" ".*\\.err$")))))
|
(add-after 'install 'install-docs
|
||||||
(add-after 'install 'install-docs
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
;; Custom install because docs/Makefile doesn't honor ${docdir}.
|
||||||
;; Custom install because docs/Makefile doesn't honor ${docdir}.
|
(let* ((doc (assoc-ref outputs "doc"))
|
||||||
(let* ((doc (assoc-ref outputs "doc"))
|
(docdir (string-append doc "/share/doc/hypre-"
|
||||||
(docdir (string-append doc "/share/doc/hypre-" ,version)))
|
#$version)))
|
||||||
(with-directory-excursion "docs"
|
(with-directory-excursion "docs"
|
||||||
(for-each (lambda (base)
|
(for-each (lambda (base)
|
||||||
(install-file (string-append base ".pdf") docdir)
|
(install-file (string-append base
|
||||||
(copy-recursively (string-append base "-html")
|
".pdf") docdir)
|
||||||
(string-append docdir "/" base)))
|
(copy-recursively (string-append base
|
||||||
'("usr-manual" "ref-manual")))))))))
|
"-html")
|
||||||
|
(string-append docdir
|
||||||
|
"/" base)))
|
||||||
|
'("usr-manual" "ref-manual")))))))))
|
||||||
(home-page "https://computing.llnl.gov/projects\
|
(home-page "https://computing.llnl.gov/projects\
|
||||||
/hypre-scalable-linear-solvers-multigrid-methods")
|
/hypre-scalable-linear-solvers-multigrid-methods")
|
||||||
(synopsis "Library of solvers and preconditioners for linear equations")
|
(synopsis "Library of solvers and preconditioners for linear equations")
|
||||||
|
@ -7295,12 +7299,11 @@ (define-public hypre-openmpi
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments hypre)
|
(substitute-keyword-arguments (package-arguments hypre)
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
``("--with-MPI"
|
#~`("--with-MPI" ,@(delete "--without-MPI" #$flags)))
|
||||||
,@(delete "--without-MPI" ,flags)))
|
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
#~(modify-phases #$phases
|
||||||
(add-before 'check 'mpi-setup
|
(add-before 'check 'mpi-setup
|
||||||
,%openmpi-setup)))))
|
#$%openmpi-setup)))))
|
||||||
(synopsis "Parallel solvers and preconditioners for linear equations")
|
(synopsis "Parallel solvers and preconditioners for linear equations")
|
||||||
(description
|
(description
|
||||||
"HYPRE is a software library of high performance preconditioners and
|
"HYPRE is a software library of high performance preconditioners and
|
||||||
|
|
Loading…
Reference in a new issue