mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -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
|
||||
(list openblas))
|
||||
(arguments
|
||||
`(#:modules ((srfi srfi-1)
|
||||
,@%default-gnu-modules)
|
||||
#:configure-flags '("--enable-shared"
|
||||
"--disable-fortran"
|
||||
"--without-MPI"
|
||||
"--with-openmp"
|
||||
"--with-fei"
|
||||
"--with-lapack"
|
||||
"--with-blas")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'configure 'chdir-src
|
||||
(lambda _ (chdir "src")))
|
||||
(replace 'configure
|
||||
(lambda* (#:key build target configure-flags
|
||||
(list #:modules `((srfi srfi-1)
|
||||
,@%default-gnu-modules)
|
||||
#:configure-flags #~'("--enable-shared"
|
||||
"--disable-fortran"
|
||||
"--without-MPI"
|
||||
"--with-openmp"
|
||||
"--with-fei"
|
||||
"--with-lapack"
|
||||
"--with-blas")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-before 'configure 'chdir-src
|
||||
(lambda _
|
||||
(chdir "src")))
|
||||
(replace 'configure
|
||||
(lambda* (#:key build target configure-flags
|
||||
#:allow-other-keys #:rest args)
|
||||
(let* ((configure (assoc-ref %standard-phases 'configure)))
|
||||
(apply configure
|
||||
(append args
|
||||
(list #:configure-flags
|
||||
(cons (string-append
|
||||
"--host=" (or target build))
|
||||
configure-flags)))))))
|
||||
(add-after 'build 'build-docs
|
||||
(lambda _
|
||||
(invoke "make" "-C" "docs")))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(setenv "LD_LIBRARY_PATH"
|
||||
(string-append (getcwd) "/hypre/lib"))
|
||||
(setenv "PATH"
|
||||
(string-append "." ":"
|
||||
(getenv "PATH")))
|
||||
(invoke "make" "check" "CHECKRUN=")
|
||||
(for-each (lambda (filename)
|
||||
(let ((size (stat:size (stat filename))))
|
||||
(when (positive? size)
|
||||
(error (format #f
|
||||
"~a size ~d; error indication~%"
|
||||
filename size)))))
|
||||
(find-files "test" ".*\\.err$")))))
|
||||
(add-after 'install 'install-docs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Custom install because docs/Makefile doesn't honor ${docdir}.
|
||||
(let* ((doc (assoc-ref outputs "doc"))
|
||||
(docdir (string-append doc "/share/doc/hypre-" ,version)))
|
||||
(with-directory-excursion "docs"
|
||||
(for-each (lambda (base)
|
||||
(install-file (string-append base ".pdf") docdir)
|
||||
(copy-recursively (string-append base "-html")
|
||||
(string-append docdir "/" base)))
|
||||
'("usr-manual" "ref-manual")))))))))
|
||||
(let* ((configure (assoc-ref %standard-phases 'configure)))
|
||||
(apply configure
|
||||
(append args
|
||||
(list #:configure-flags
|
||||
(cons (string-append "--host="
|
||||
(or target build))
|
||||
configure-flags)))))))
|
||||
(add-after 'build 'build-docs
|
||||
(lambda _
|
||||
(invoke "make" "-C" "docs")))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(setenv "LD_LIBRARY_PATH"
|
||||
(string-append (getcwd) "/hypre/lib"))
|
||||
(setenv "PATH"
|
||||
(string-append "." ":" (getenv "PATH")))
|
||||
(invoke "make" "check" "CHECKRUN=")
|
||||
(for-each (lambda (filename)
|
||||
(let ((size (stat:size (stat filename))))
|
||||
(when (positive? size)
|
||||
(error (format #f
|
||||
"~a size ~d; error indication~%"
|
||||
filename size)))))
|
||||
(find-files "test" ".*\\.err$")))))
|
||||
(add-after 'install 'install-docs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Custom install because docs/Makefile doesn't honor ${docdir}.
|
||||
(let* ((doc (assoc-ref outputs "doc"))
|
||||
(docdir (string-append doc "/share/doc/hypre-"
|
||||
#$version)))
|
||||
(with-directory-excursion "docs"
|
||||
(for-each (lambda (base)
|
||||
(install-file (string-append base
|
||||
".pdf") docdir)
|
||||
(copy-recursively (string-append base
|
||||
"-html")
|
||||
(string-append docdir
|
||||
"/" base)))
|
||||
'("usr-manual" "ref-manual")))))))))
|
||||
(home-page "https://computing.llnl.gov/projects\
|
||||
/hypre-scalable-linear-solvers-multigrid-methods")
|
||||
(synopsis "Library of solvers and preconditioners for linear equations")
|
||||
|
@ -7295,12 +7299,11 @@ (define-public hypre-openmpi
|
|||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments hypre)
|
||||
((#:configure-flags flags)
|
||||
``("--with-MPI"
|
||||
,@(delete "--without-MPI" ,flags)))
|
||||
#~`("--with-MPI" ,@(delete "--without-MPI" #$flags)))
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-before 'check 'mpi-setup
|
||||
,%openmpi-setup)))))
|
||||
#~(modify-phases #$phases
|
||||
(add-before 'check 'mpi-setup
|
||||
#$%openmpi-setup)))))
|
||||
(synopsis "Parallel solvers and preconditioners for linear equations")
|
||||
(description
|
||||
"HYPRE is a software library of high performance preconditioners and
|
||||
|
|
Loading…
Reference in a new issue