diff options
Diffstat (limited to 'gnu/packages/profiling.scm')
-rw-r--r-- | gnu/packages/profiling.scm | 157 |
1 files changed, 79 insertions, 78 deletions
diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm index b4d52d8d85..2740644448 100644 --- a/gnu/packages/profiling.scm +++ b/gnu/packages/profiling.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Dave Love <fx@gnu.org> ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (gnu packages profiling) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) ; avoid zlib, expat clashes #:use-module (guix download) #:use-module (guix utils) @@ -48,74 +50,75 @@ (define-public papi (package (name "papi") - (version "5.5.1") + (version "6.0.0") (source (origin (method url-fetch) (uri (string-append "http://icl.utk.edu/projects/papi/downloads/papi-" version ".tar.gz")) - (sha256 (base32 "1m62s8fkjjgq04ayf18jcxc33rqfd7nrkdw1gr54q5pn4cijrp29")))) + (sha256 (base32 + "0pq5nhy105fpnk78k6l9ygsfr5akn6l0ck1hbf2c419lmsfp0hil")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled software. + (for-each delete-file-recursively + '("src/libpfm-3.y" "src/libpfm4" + "src/perfctr-2.6.x" + "src/perfctr-2.7.x")) + + ;; Adjust include directives. + (substitute* "src/components/lmsensors/linux-lmsensors.c" + (("<sensors.h>") + "<sensors/sensors.h>")))))) (build-system gnu-build-system) (inputs - `(("ncurses" ,ncurses) - ("lm-sensors" ,lm-sensors "lib") - ("rdma-core" ,rdma-core) - ("infiniband-diags" ,infiniband-diags "lib") - ("net-tools" ,net-tools))) + (list ncurses + rdma-core + libpfm4 + `(,lm-sensors "lib") + `(,infiniband-diags "lib") + net-tools)) (native-inputs - `(("autoconf" ,autoconf) - ("gfortran" ,gfortran))) + (list gfortran)) (arguments - `(#:tests? #f ; no check target - #:configure-flags - ;; These are roughly per Fedora, but elide mx (assumed to be dead, even - ;; Open-MX) and add and powercap -- I don't know the pros/cons of - ;; infiniband and infiniband_mad, but you can't use them together, and - ;; the umad version needs at least one patch. - ;; Implicit enabled components: perf_event perf_event_uncore - `("--with-perf-events" "--with-shared-lib=yes" "--with-shlib" - "--with-static-lib=no" - "--with-components=appio coretemp example lustre micpower net rapl \ + (list #:tests? #f ;no check target + #:configure-flags + ;; These are roughly per Fedora, but elide mx (assumed to be dead, even + ;; Open-MX) and add and powercap -- I don't know the pros/cons of + ;; infiniband and infiniband_mad, but you can't use them together, and + ;; the umad version needs at least one patch. + ;; Implicit enabled components: perf_event perf_event_uncore + #~`("--with-perf-events" "--with-shared-lib=yes" "--with-shlib" + "--with-static-lib=no" "--with-shlib-tools" + "--with-components=appio coretemp example lustre micpower net rapl \ stealtime lmsensors infiniband powercap" - ;; So utils get rpath set correctly: - ,(string-append "LDFLAGS=-Xlinker -rpath -Xlinker " - (assoc-ref %outputs "out") "/lib")) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'autoconf - (lambda _ - (chdir "src") - (invoke "autoconf") - #t)) - ;; Amalgamating with the following clause gives double substitution. - (add-before 'patch-source-shebangs 'patch-components - (lambda _ - (with-directory-excursion "src/components" - (substitute* '("lmsensors/configure" "infiniband_umad/configure") - (("/bin/sh") (which "sh")))) - #t)) - (add-after 'configure 'components - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "components" - (with-directory-excursion "infiniband_umad" - (invoke "./configure")) - (with-directory-excursion "lmsensors" - (let ((base (assoc-ref inputs "lm-sensors"))) - (invoke "./configure" - (string-append "--with-sensors_incdir=" - base "/include/sensors") - (string-append "--with-sensors_libdir=" - base "/lib"))))) - #t)) - (add-after 'install 'extra-doc - (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "out") - "/share/doc/" ,name "-" ,version))) - (chdir "..") ; we went into src above - (for-each (lambda (file) - (install-file file doc)) - '("README" "RELEASENOTES.txt")) - #t)))))) + ;; So utils get rpath set correctly: + ,(string-append "LDFLAGS=-Xlinker -rpath -Xlinker " + #$output "/lib") + ,(string-append "--with-pfm-prefix=" + #$(this-package-input "libpfm4"))) + + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "src") + + ;; Work around a mistake whereby 'configure' would always error + ;; out when passing '--with-static-lib=no'. + (substitute* "configure" + (("test \"\\$static_lib\" = \"no\"") + "false")))) + (add-after 'install 'extra-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") + "/share/doc/" + #$name "-" #$version))) + (chdir "..") ; we went into src above + (for-each (lambda (file) + (install-file file doc)) + '("README.md" "RELEASENOTES.txt")))))))) (home-page "https://icl.utk.edu/papi/") (synopsis "Performance Application Programming Interface") (description @@ -126,14 +129,14 @@ real time, the relation between software performance and processor events. In addition, PAPI provides access to a collection of components that expose performance measurement opportunites across the hardware and software stack.") + (properties + '((release-monitoring-url + . "http://icl.cs.utk.edu/papi/software/"))) ;; See Debian papi copyright file. (license (list license:bsd-3 - license:lgpl2.1+ ;src/components/infiniband/pscanf.h + license:lgpl2.1+ ;src/components/infiniband/pscanf.h ;; not used in output license:gpl2+ ;src/components/appio/tests/iozone/gengnuplot.sh - ;src/libpfm-3.y/*/multiplex* - ;; "BSD-like": src/libpfm-3.y/*, src/libpfm4/* - ;; lgpl2.1+: src/perfctr-2.*/* )))) ;; NB. there's a potential name clash with libotf. @@ -147,7 +150,7 @@ performance measurement opportunites across the hardware and software stack.") (uri (string-append "http://www.vi-hps.org/upload/packages/otf2/otf2-" version ".tar.gz")) (sha256 (base32 "1ls7rz6qwnqbkifpafc95bnfh3m9xbs74in8zxlnhfbgwx11nn81")))) - (native-inputs `(("python" ,python))) + (native-inputs (list python)) (outputs '("doc" ; 18MB "lib" "out")) @@ -182,9 +185,9 @@ memory-efficient event trace data format plus support library.") (sha256 (base32 "1xaf25lcxk4ky1kzfks40ja9mayh8pnmrzch2107c8dcjrsxsd4h")))) (build-system gnu-build-system) - (inputs `(("gfortran" ,gfortran))) - (native-inputs `(("gawk" ,gawk) ; for tests - ("which" ,which))) + (inputs (list gfortran)) + (native-inputs (list gawk ; for tests + which)) (home-page "https://www.vi-hps.org/projects/score-p") (synopsis "OpenMP runtime performance measurement instrumenter") (description "OPARI2 is a source-to-source instrumentation tool for OpenMP @@ -204,11 +207,9 @@ with calls to the POMP2 measurement interface.") version ".tar.gz")) (sha256 (base32 "04irflia4rfw02093w9nx7rr98r640y4q8hisjywvd4b7r3nzhhx")) (patches (search-patches "cube-nocheck.patch")))) - (inputs `(("dbus" ,dbus) - ("zlib" ,zlib))) - (native-inputs `(("perl" ,perl) - ("qtbase" ,qtbase-5) ; native because of qmake - ("which" ,which))) + (inputs (list dbus zlib)) + (native-inputs (list perl qtbase-5 ; native because of qmake + which)) ;; FIXME: The doc is 14MB, but adding a doc output results in a cycle. (outputs '("out" ;"doc" @@ -354,13 +355,13 @@ different kinds of performance behavior.") ("openmpi" ,openmpi) ("zlib" ,zlib))) (native-inputs - `(("gfortran" ,gfortran) - ("flex" ,flex) - ("cube" ,cube) ;for cube-config - ("bison" ,bison) - ("python" ,python) - ("doxygen" ,doxygen) - ("which" ,which))) + (list gfortran + flex + cube ;for cube-config + bison + python + doxygen + which)) (arguments `(#:configure-flags (list "--enable-shared" "--disable-static" |