emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#28673: closed ([PATCH 1/6] gnu: Add papi.)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#28673: closed ([PATCH 1/6] gnu: Add papi.)
Date: Thu, 16 Nov 2017 09:48:01 +0000

Your message dated Thu, 16 Nov 2017 10:47:35 +0100
with message-id <address@hidden>
and subject line Re: [bug#28673] [PATCH 5/6] gnu: libunwind: Merge update and 
test changes.
has caused the debbugs.gnu.org bug report #28673,
regarding [PATCH 1/6] gnu: Add papi.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
28673: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28673
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 1/6] gnu: Add papi. Date: Mon, 2 Oct 2017 21:48:43 +0100
* gnu/packages/profiling.scm: New file.
* gnu/local.mk: Add it.
---
 gnu/local.mk               |   1 +
 gnu/packages/profiling.scm | 122 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 gnu/packages/profiling.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index edd6d8237..016c46c6c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -326,6 +326,7 @@ GNU_SYSTEM_MODULES =                                \
   %D%/packages/plotutils.scm                   \
   %D%/packages/polkit.scm                      \
   %D%/packages/popt.scm                                \
+  %D%/packages/profiling.scm                   \
   %D%/packages/pth.scm                         \
   %D%/packages/pulseaudio.scm                  \
   %D%/packages/pumpio.scm                      \
diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm
new file mode 100644
index 000000000..cd678cfea
--- /dev/null
+++ b/gnu/packages/profiling.scm
@@ -0,0 +1,122 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Dave Love <address@hidden>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages profiling)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:) ; avoid zlib, expat clashes
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)      ;for "which"
+  #:use-module (gnu packages fabric-management)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages ncurses))
+
+;; Fixme: Separate out lib and fix resulting cycle errors; separate libpfm
+;; output(?); build libmsr and add that component.
+(define-public papi
+  (package
+    (name "papi")
+    (version "5.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://icl.utk.edu/projects/papi/downloads/papi-";
+                           version ".tar.gz"))
+       (sha256 (base32 
"1m62s8fkjjgq04ayf18jcxc33rqfd7nrkdw1gr54q5pn4cijrp29"))))
+    (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)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("gfortran" ,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 \
+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")
+             (zero? (system* "autoconf"))))
+         ;; 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"))))))
+         (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")))))))))
+         (add-after 'install 'extra-doc
+           (lambda _
+             (let ((doc (string-append (assoc-ref %outputs "out") 
"/share/doc")))
+               (mkdir-p doc)
+               (chdir "..")             ; we went into src above
+               (for-each (lambda (file)
+                           (install-file file doc))
+                         '("README" "RELEASENOTES.txt" "LICENSE.txt"))))))))
+    (home-page "http://icl.cs.utk.edu/papi/";)
+    (synopsis "Performance Application Programming Interface")
+    (description "PAPI provides the tool designer and application engineer 
with a consistent
+interface and methodology for use of the performance counter hardware found in
+most major microprocessors.  PAPI enables software engineers to see, in near
+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.")
+    ;; See Debian papi copyright file.
+    (license (list license:bsd-3
+                   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.*/*
+                   ))))
-- 
2.11.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#28673] [PATCH 5/6] gnu: libunwind: Merge update and test changes. Date: Thu, 16 Nov 2017 10:47:35 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
Hi Dave,

address@hidden (Ludovic Courtès) skribis:

> Dave Love <address@hidden> skribis:
>
>> * gnu/packages/patches/libunwind-known_test_failure_to_XFAIL_TESTS.patch:
>> New file.
>> * gnu/packages/patches/libunwind-ppc_lib64.patch: New file.
>> * gnu/packages/libunwind.scm (libunwind)[source]: Use them.
>> (libunwind)(native-inputs): Add autotools.
>> (libunwind)(arguments): Enable tests; run autoreconf.
>> * gnu/local.mk: Update dependencies.
>
> [...]
>
>> +++ b/gnu/packages/patches/libunwind-known_test_failure_to_XFAIL_TESTS.patch
>> @@ -0,0 +1,11 @@
>> +--- libunwind-1.2.1/tests/Makefile.am~      1970-01-01 01:00:00.000000000 
>> +0100
>> ++++ libunwind-1.2.1/tests/Makefile.am       2017-09-06 13:32:52.331888031 
>> +0100
>> +@@ -97,7 +97,7 @@
>> + XFAIL_TESTS =
>> + 
>> + if !ARCH_IA64
>> +-XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1
>> ++XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1 test-ptrace
>> + endif
>> + 
>> + # Use if arch defines but does not support PTRACE_SINGLESTEP
>> diff --git a/gnu/packages/patches/libunwind-ppc_lib64.patch 
>> b/gnu/packages/patches/libunwind-ppc_lib64.patch
>> new file mode 100644
>> index 000000000..9ab0108ae
>> --- /dev/null
>> +++ b/gnu/packages/patches/libunwind-ppc_lib64.patch
>> @@ -0,0 +1,17 @@
>> +Index: pkg-libunwind/configure.ac
>> +===================================================================
>> +--- pkg-libunwind.orig/configure.ac 2014-05-07 15:13:28.247711669 +0900
>> ++++ pkg-libunwind/configure.ac      2014-05-07 15:14:25.924958386 +0900
>> +@@ -164,12 +164,6 @@
>> + AM_CONDITIONAL(USE_DWARF, [test x$use_dwarf = xyes])
>> + AC_MSG_RESULT([$use_dwarf])
>> + 
>> +-if test x$target_arch = xppc64; then
>> +-        libdir='${exec_prefix}/lib64'
>> +-        AC_MSG_NOTICE([PowerPC64 detected, lib will be installed 
>> ${libdir}]);
>> +-        AC_SUBST([libdir])
>> +-fi
>
> Could you avoid this patch and instead use ‘substitute*’ on ‘configure’
> and ‘tests/Makefile.in’ such that we don’t need the extra dependency on
> the autotools?
>
> Please make sure to add a comment explaining why we’re doing this (the
> Makefile.am bit is not obvious to me.)

Since these libunwind changes do not seem to relate to the rest of this
PAPI series (which has been applied), I’m closing it now.  Feel free to
resubmit separately if you think it’s still relevant!

Thanks,
Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]