>From 1772aa47c3bc71521340d7f569d4d906ab7f53e9 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 31 Jul 2017 15:01:59 +0100 Subject: [PATCH] gnu: valgrind: Add "doc" and "openmpi" outputs. Also don't configure openmpi with valgrind; rely on the wrapper library from the valgrind package, like Fedora and Debian. * gnu/packages/valgrind.scm (valgrind)[outputs]: New field. [arguments]: Add install-doc and install-openmpi phases. [description]: Mention openmpi output. * gnu/packages/mpi.scm (openmpi)[arguments]: Don't configure with valgrind. --- gnu/packages/mpi.scm | 9 ++------- gnu/packages/valgrind.scm | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 64d1f497b..f3fc83b26 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -36,8 +36,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages perl) #:use-module (gnu packages ncurses) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages valgrind)) + #:use-module (gnu packages pkg-config)) ;; Fixme: Replace hwloc-dump-hwdata.service with shepherd equivalent (define-public hwloc @@ -140,8 +139,7 @@ bind processes, and much more.") (build-system gnu-build-system) (inputs `(("hwloc" ,hwloc "nogui") - ("gfortran" ,gfortran) - ("valgrind" ,valgrind))) + ("gfortran" ,gfortran))) (native-inputs `(("pkg-config" ,pkg-config) ("perl" ,perl))) @@ -150,10 +148,7 @@ bind processes, and much more.") "--enable-mpi-ext=all" "--with-devel-headers" - "--enable-memchecker" "--with-sge" - ,(string-append "--with-valgrind=" - (assoc-ref %build-inputs "valgrind")) ,(string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))) #:phases (modify-phases %standard-phases diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm index 5f2bef16d..9bfba4761 100644 --- a/gnu/packages/valgrind.scm +++ b/gnu/packages/valgrind.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2017 Dave Love ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (guix licenses) #:use-module (gnu packages gdb) #:use-module (gnu packages perl) + #:use-module (gnu packages mpi) #:use-module (gnu packages)) (define-public valgrind @@ -53,17 +55,36 @@ (("obj:/lib") "obj:*/lib") (("obj:/usr/X11R6/lib") "obj:*/lib") (("obj:/usr/lib") "obj:*/lib")) - #t)))))) + #t))) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((orig (format #f "~a/share/doc" (assoc-ref outputs "out"))) + (dest (format #f "~a/share" (assoc-ref outputs "doc")))) + (mkdir-p dest) + (zero? (system* "mv" orig dest))))) + (add-after 'install 'install-openmpi + (lambda* (#:key outputs #:allow-other-keys) + (let ((dest (format #f "~a/lib/valgrind" + (assoc-ref outputs "openmpi")))) + (mkdir-p dest) + (zero? + (system (format #f "mv ~a/lib/valgrind/libmpiwrap* ~a" + (assoc-ref outputs "out") dest))))))))) (inputs `(;; GDB is needed to provide a sane default for `--db-command'. ("gdb" ,gdb))) (native-inputs `(("perl" ,perl))) + (outputs '("doc" ;16 MB + "openmpi" "out")) (home-page "http://www.valgrind.org/") (synopsis "Debugging and profiling tool suite") (description "Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can -also use Valgrind to build new tools.") +also use Valgrind to build new tools. + +The openmpi output contains a wrapper library for openmpi, as described +in the documenation.") (license gpl2+) ;; Building VEX on mips64el-linux fails with "opcode not supported on this -- 2.11.0