X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/3c8d1f9492f3c71eb1d0d75b653ef723e787925e..e2e1dea2bb46fb0e64ca77362bbe72e3f4c9612f:/gnu/packages/profiling.scm diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm index 9a2f2a6642..42d6d6a72a 100644 --- a/gnu/packages/profiling.scm +++ b/gnu/packages/profiling.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Dave Love +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,13 +26,22 @@ #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) ;for "which" + #:use-module (gnu packages bison) + #:use-module (gnu packages compression) + #:use-module (gnu packages documentation) #:use-module (gnu packages fabric-management) + #:use-module (gnu packages flex) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) + #:use-module (gnu packages glib) #:use-module (gnu packages libunwind) #:use-module (gnu packages linux) + #:use-module (gnu packages mpi) #:use-module (gnu packages ncurses) - #:use-module (gnu packages python)) + #:use-module (gnu packages perl) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) + #:use-module (gnu packages qt)) ;; Fixme: Separate out lib and fix resulting cycle errors; separate libpfm ;; output(?); build libmsr and add that component. @@ -56,7 +66,7 @@ `(("autoconf" ,autoconf) ("gfortran" ,gfortran))) (arguments - '(#:tests? #f ; no check target + `(#: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 @@ -75,7 +85,8 @@ stealtime lmsensors infiniband powercap" (add-before 'configure 'autoconf (lambda _ (chdir "src") - (zero? (system* "autoconf")))) + (invoke "autoconf") + #t)) ;; Amalgamating with the following clause gives double substitution. (add-before 'patch-source-shebangs 'patch-components (lambda _ @@ -86,28 +97,26 @@ stealtime lmsensors infiniband powercap" (add-after 'configure 'components (lambda* (#:key inputs #:allow-other-keys) (with-directory-excursion "components" - (and - (with-directory-excursion "infiniband_umad" - (zero? (system* "./configure"))) - (with-directory-excursion "lmsensors" - (let ((base (assoc-ref inputs "lm-sensors"))) - (zero? - (system* - "./configure" - (string-append "--with-sensors_incdir=" base - "/include/sensors") - (string-append "--with-sensors_libdir=" base "/lib"))))))))) + (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"))) - (mkdir-p doc) + "/share/doc/" ,name "-" ,version))) (chdir "..") ; we went into src above (for-each (lambda (file) (install-file file doc)) - '("README" "RELEASENOTES.txt" "LICENSE.txt")) + '("README" "RELEASENOTES.txt")) #t)))))) - (home-page "http://icl.cs.utk.edu/papi/") + (home-page "https://icl.utk.edu/papi/") (synopsis "Performance Application Programming Interface") (description "PAPI provides the tool designer and application engineer with a consistent @@ -131,13 +140,13 @@ performance measurement opportunites across the hardware and software stack.") (define-public otf2 (package (name "otf2") - (version "2.1") + (version "2.1.1") (source (origin (method url-fetch) (uri (string-append "http://www.vi-hps.org/upload/packages/otf2/otf2-" version ".tar.gz")) - (sha256 (base32 "1lyaqhdfaqm1kd23yk71g71vkscw83s7m57j017y768h8sh8xlwa")))) + (sha256 (base32 "1ls7rz6qwnqbkifpafc95bnfh3m9xbs74in8zxlnhfbgwx11nn81")))) (native-inputs `(("python" ,python))) (outputs '("doc" ; 18MB "lib" @@ -157,14 +166,14 @@ performance measurement opportunites across the hardware and software stack.") #t))))) (home-page "http://www.vi-hps.org/projects/score-p/") (synopsis "Open Trace Format 2 library") - (description "The Open Trace Format 2 (OTF2) is a scalable, memory -efficient event trace data format plus support library.") + (description "The Open Trace Format 2 (@dfn{OTF2}) is a scalable, +memory-efficient event trace data format plus support library.") (license license:bsd-3))) (define-public opari2 (package (name "opari2") - (version "2.0.2") + (version "2.0.3") (source (origin (method url-fetch) @@ -173,23 +182,211 @@ efficient event trace data format plus support library.") (minor (cadr parts))) (string-append "http://www.vi-hps.org/upload/packages/opari2/opari2-" version ".tar.gz"))) - (sha256 (base32 "1ph8l5c646bm9l5vcn8rrbjvkyi7y8yvn2ny95r6kmlzs766g3q8")))) + (sha256 (base32 "0v785mhw9azj3ln5v7akj5b1cxvzfkxz8kj565pfwllir7xzqbky")))) (build-system gnu-build-system) (inputs `(("gfortran" ,gfortran))) (native-inputs `(("gawk" ,gawk) ;for tests ("which" ,which))) + (home-page "http://www.vi-hps.org/projects/score-p") + (synopsis "OpenMP runtime performance measurement instrumenter") + (description "OPARI2 is a source-to-source instrumentation tool for OpenMP +and hybrid codes. It surrounds OpenMP directives and runtime library calls +with calls to the POMP2 measurement interface.") + (license license:bsd-3))) + +(define-public cube + (package + (name "cube") + (version "4.3.5") + (source + (origin + (method url-fetch) + (uri (string-append + "http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-" + version ".tar.gz")) + (sha256 (base32 "04irflia4rfw02093w9nx7rr98r640y4q8hisjywvd4b7r3nzhhx")) + (patches (search-patches "cube-nocheck.patch")))) + (inputs `(("dbus" ,dbus) + ("zlib" ,zlib))) + (native-inputs `(("perl" ,perl) + ("qtbase" ,qtbase) ; native because of qmake + ("which" ,which))) + + ;; FIXME: The doc is 14MB, but adding a doc output results in a cycle. + (outputs '("out" ;"doc" + "lib")) + + (build-system gnu-build-system) (arguments - `(#:phases + `(#:configure-flags + `("--enable-shared" "--disable-static" "--disable-silent-rules" + ,(string-append "LDFLAGS=-L" (assoc-ref %outputs "lib") "/lib")) + #:parallel-tests? #f + #:phases (modify-phases %standard-phases + (add-after 'configure 'rpath + ;; Account for moving GUI stuff + (lambda* (#:key outputs #:allow-other-keys) + (let ((wl (string-append "-Wl,-rpath=" (assoc-ref outputs "out") + "/lib"))) + (substitute* "build-backend/Makefile" + (("^cube_LDFLAGS =") (string-append "cube_LDFLAGS = " wl)) + (("^libheatmap_plugin_la_LDFLAGS =") + (string-append "libheatmap_plugin_la_LDFLAGS = " wl)) + (("^libbarplot_plugin_la_LDFLAGS =") + (string-append "libbarplot_plugin_la_LDFLAGS = " wl))) + #t))) + (add-before 'install 'includes-cube + ;; It tries to install here before include exists. + (lambda* (#:key outputs #:allow-other-keys) + (let ((inc (string-append (assoc-ref outputs "lib") "/include"))) + (mkdir-p (string-append inc "/cube")) + (mkdir-p (string-append inc "/cubew")) + #t))) (add-after 'install 'licence (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "out") - "/share/doc/opari2"))) + (let ((doc (string-append (assoc-ref outputs "lib") + "/share/doc/cube"))) (install-file "COPYING" doc) + #t))) + ;; XXX: Commented due to cycle (see comment above.) + ;; (add-after 'install 'doc + ;; (lambda _ + ;; (let ((share (string-append (assoc-ref %outputs "doc") + ;; "/share"))) + ;; (mkdir-p share) + ;; (rename-file (string-append %output "/share/doc") + ;; (string-append share "/doc"))))) + (add-after 'install 'gui-stuff + ;; Get the Qt horror dependencies out of the lib closure + (lambda _ + (let ((outlib (string-append (assoc-ref %outputs "out") "/lib")) + (lib (string-append (assoc-ref %outputs "lib") "/lib"))) + (mkdir-p outlib) + (rename-file (string-append lib "/cube-plugins") + (string-append outlib "/cube-plugins")) + (for-each (lambda (file) + (rename-file + file (string-append outlib "/" (basename file)))) + (append (find-files lib "libgraphwidgetcommon-plugin\\..*") + (find-files lib "libcube4gui\\.so.*"))) + #t))) + (add-after 'install 'move-include + ;; Most of the headers end up under %output for some reason, + ;; despite --includedir in configure. + (lambda* (#:key outputs #:allow-other-keys) + (let ((outinc (string-append (assoc-ref outputs "out") + "/include")) + (libinc (string-append (assoc-ref outputs "lib") + "/include"))) + (for-each (lambda (file) + (let ((from (string-append outinc "/" file))) + (copy-recursively from libinc) + (delete-file-recursively from))) + '("cube" "cubew")) + #t))) + + ;; XXX: This doesn't work because cube-config, which is needed for + ;; building stuff, sources cube-config-frontend. We don't want that + ;; in the lib output because it pulls in >1GB via QT. + ;; + ;; (add-after 'install 'cube-config + ;; (lambda _ + ;; (let* ((lib (assoc-ref %outputs "lib")) + ;; (libbin (string-append lib "/bin"))) + ;; (mkdir-p libbin) + ;; (system (string-append "mv " (assoc-ref %outputs "out") + ;; "/bin/cube-config* " libbin)) + ;; (substitute* (list (string-append libbin "/cube-config")) + ;; (("^prefix=.*") (string-append "prefix=" lib)) + ;; (("^exec_prefix=\"\\$\\{prefix\\}\"") + ;; (string-append "exec_prefix=" lib)))))) + (add-after 'install 'cube-config + (lambda* (#:key outputs #:allow-other-keys) + (let* ((lib (assoc-ref outputs "lib")) + (libbin (string-append lib "/bin"))) + (mkdir-p libbin) + (install-file (string-append %output "/bin/cube-config") libbin) + (install-file (string-append %output "/bin/cube-config-backend") + libbin) + (substitute* (list (string-append libbin "/cube-config")) + (("^source .*frontend.*$") "") + (((assoc-ref outputs "out")) lib)) #t)))))) - (home-page "http://www.vi-hps.org/projects/score-p") - (synopsis "OpenMP runtime performance measurement instrumenter") - (description "OPARI2 is a source-to-source instrumentation tool for OpenMP -and hybrid codes. It surrounds OpenMP directives and runtime library calls -with calls to the POMP2 measurement interface.") + (home-page "http://www.scalasca.org/software/cube-4.x/download.html") + (synopsis "Performance report explorer for parallel programs") + (description + "CUBE (CUBE Uniform Behavioral Encoding) is a tool to display a variety +of performance metrics for parallel programs including MPI and OpenMP +applications. CUBE allows interactive exploration of a multidimensional +performance space in a scalable fashion. Scalability is achieved in two ways: +hierarchical decomposition of individual dimensions and aggregation across +different dimensions. All performance metrics are uniformly accommodated in +the same display and thus provide the ability to easily compare the effects of +different kinds of performance behavior.") (license license:bsd-3))) + +(define (make-scorep mpi) + (package + (name (string-append "scorep-" (package-name mpi))) + (version "3.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.vi-hps.org/upload/packages/scorep/scorep-" + version ".tar.gz")) + (sha256 + (base32 + "0h45357djna4dn9jyxx0n36fhhms3jrf22988m9agz1aw2jfivs9")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled software. + '(begin + (for-each delete-file-recursively + '("vendor/opari2" "vendor/cube")) + #t)))) + (build-system gnu-build-system) + (inputs + `(("mpi" ,mpi) + ("papi" ,papi) + ("opari2" ,opari2) + ("libunwind" ,libunwind) + ("otf2" ,otf2) + ("cubelib" ,cube "lib") ;for lib, include + ("openmpi" ,openmpi) + ("zlib" ,zlib))) + (native-inputs + `(("gfortran" ,gfortran) + ("flex" ,flex) + ("cube" ,cube) ;for cube-config + ("bison" ,bison) + ("python" ,python) + ("doxygen" ,doxygen) + ("which" ,which))) + (arguments + `(#:configure-flags + (list "--enable-shared" "--disable-static" + (string-append "--with-opari2=" + (assoc-ref %build-inputs "opari2")) + (string-append "--with-cube=" + (assoc-ref %build-inputs "cube"))) + #:parallel-tests? #f + #:make-flags '("V=1") + #:phases + (modify-phases %standard-phases + (add-after 'install 'licence + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") + "/share/doc/scorep"))) + (install-file "COPYING" doc) + #t)))))) + (home-page "http://www.vi-hps.org/projects/score-p/") + (synopsis "Performance measurement infrastructure for parallel code") + (description + "The Score-P (Scalable Performance Measurement Infrastructure for +Parallel Codes) measurement infrastructure is a scalable and easy-to-use tool +suite for profiling, event trace recording, and online analysis of +high-performance computing (HPC) applications.") + (license license:cpl1.0))) + +(define-public scorep-openmpi (make-scorep openmpi))