summaryrefslogtreecommitdiff
path: root/gnu/packages/profiling.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/profiling.scm')
-rw-r--r--gnu/packages/profiling.scm272
1 files changed, 154 insertions, 118 deletions
diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm
index d1043d9b7c..64bcafb373 100644
--- a/gnu/packages/profiling.scm
+++ b/gnu/packages/profiling.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2023 dan <i@dan.games>
+;;; Copyright © 2025 Luca Cirrottola <luca.cirro@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -211,136 +212,106 @@ 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
+;; Since version 4.4, CUBE has been split in three different packages: CubeW,
+;; CubeLib, CubeGUI. They are still released together, so we conventionally
+;; define cubew as the parent package for cubelib and cubegui to factorize
+;; common data.
+(define-public cubew
(package
- (name "cube")
- (version "4.3.5")
+ (name "cubew")
+ (version "4.9")
(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 (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"
- "lib"))
-
+ (uri
+ (string-append "https://apps.fz-juelich.de/scalasca/releases/cube/"
+ version "/dist/cubew-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1pdcs8688y4nwcxshgs9773xmdajxahsbjsrfh8m7gv9qn0lxxsf"))))
(build-system gnu-build-system)
(arguments
- `(#: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 "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))))))
+ (list
+ #:configure-flags
+ #~(list "--enable-shared" "--disable-static" "--disable-silent-rules"
+ (string-append "--with-frontend-zlib="
+ #$(this-package-input "zlib") "/lib")
+ (string-append "--with-backend-zlib="
+ #$(this-package-input "zlib") "/lib"))))
+ (inputs
+ (list zlib))
(home-page "https://www.scalasca.org/software/cube-4.x/download.html")
- (synopsis "Performance report explorer for parallel programs")
+ (synopsis "CUBE high performance C writer library")
(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.")
+applications. CubeW is the high performance C writer library of the CUBE
+project.")
(license license:bsd-3)))
+(define-public cubelib
+ (package/inherit cubew
+ (name "cubelib")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://apps.fz-juelich.de/scalasca/releases/cube/"
+ (package-version cubew) "/dist/cubelib-"
+ (package-version cubew) ".tar.gz"))
+ (sha256
+ (base32 "0hwl0aihn6fgpl0qhqckxc3sslb78wq6xav5ykfgfjzpyddqyrd0"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments cubew)
+ ((#:configure-flags flags)
+ #~(append #$flags
+ (list "--with-compression=full")))
+ ((#:parallel-tests? _ #f) #f)))
+ (inputs
+ (list zlib))
+ (synopsis "CUBE C++ profile library")
+ (description
+ "CUBE (CUBE Uniform Behavioral Encoding) is a tool to display a variety
+of performance metrics for parallel programs including MPI and OpenMP
+applications. CubeLib is the general purpose C++ library and tool of the CUBE
+project.")))
+
+(define-public cubegui
+ (package/inherit cubew
+ (name "cubegui")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://apps.fz-juelich.de/scalasca/releases/cube/"
+ (package-version cubew) "/dist/cubegui-"
+ (package-version cubew) ".tar.gz"))
+ (sha256
+ (base32 "04byhf00xnn1ppca914ag4hq2kjv37lhwyh8dl369ps47mp6viqh"))))
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "--enable-shared" "--disable-static" "--disable-silent-rules"
+ (string-append "CXXFLAGS=-I" #$(this-package-input "dbus")
+ "/include/dbus-1.0")
+ (string-append "LDFLAGS=-L" #$(this-package-input "dbus")
+ "/lib"))))
+ (native-inputs
+ (list qtbase))
+ (inputs
+ (list cubelib
+ dbus
+ perl))
+ (synopsis "CUBE profile explorer GUI")
+ (description
+ "CUBE (CUBE Uniform Behavioral Encoding) is a tool to display a variety
+of performance metrics for parallel programs including MPI and OpenMP
+applications. CubeGUI is the graphical explorer of the CUBE project.")))
+
+;; deprecated on 2025-09-22
+(define-public cube
+ (deprecated-package "cube" cubegui))
+
(define-public tracy-wayland
(package
(name "tracy-wayland")
@@ -422,3 +393,68 @@ sampling profiler for games and other applications.")
(delete "libxkbcommon" "wayland")
(prepend glfw)))
(synopsis "Frame profiler (X11 version)")))
+
+(define-public scalasca
+ (package
+ (name "scalasca")
+ (version "2.6.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://apps.fz-juelich.de/scalasca/releases/scalasca/2.6/"
+ "dist/scalasca-" version ".tar.gz"))
+ (sha256
+ (base32
+ "18022bzdlzdgngcc5zlmsakvsk9dfg14kvg4ancqfhxy13cjzrqp"))
+ ;; Remove bundled dependencies that can be replaced by inputs
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (delete-file-recursively "vendor/cubew/")
+ (delete-file-recursively "vendor/otf2/")))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "--enable-shared" "--disable-static")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-scripts
+ ;; Use wrap-program on some outputs to resolve runtime dependency
+ ;; on coreutils, sed... without propagating these inputs.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion
+ (string-append #$output "/bin")
+ (for-each
+ (lambda (file)
+ (wrap-program file
+ `("PATH" ":" prefix ,(search-path-as-string->list
+ (getenv "PATH")))))
+ (list "scalasca" "skin" "square"))))))))
+ (inputs
+ (list openmpi
+ cubew
+ otf2
+ zlib
+ libiberty
+ which ; configure and runtime dependency
+ findutils ; runtime dependency
+ gawk ; runtime dependency
+ scorep-openmpi ; runtime dependency
+ cubelib ; otherwise "ERROR: cube_dump is not available!"
+ cubegui ; needed at runtime
+ bash-minimal)) ; needed for using "wrap-program" in the recipe
+ (home-page "https://scalasca.org")
+ (synopsis "Performance analysis of parallel programs through runtime
+measurements")
+ (description
+ "Scalasca targets mainly scientific and engineering applications based on
+the programming interfaces MPI and OpenMP, including hybrid applications based
+on a combination of the two. Unlike Scalasca 1.x, the Scalasca 2.x release
+series is based on the community instrumentation and measurement infrastructure
+Score-P. This significantly improves interoperability with other performance
+analysis tool suites such as Vampir and TAU due to the usage of the two common
+data formats CUBE4 for profiles and the Open Trace Format 2 (OTF2) for event
+trace data.")
+ (license license:bsd-3)))