Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-cluster/extrae/
Date: Wed, 21 Apr 2021 07:32:42
Message-Id: 1618967831.9a8335750d5b97c8963cd8799499c469605734d3.andrewammerlaan@gentoo
1 commit: 9a8335750d5b97c8963cd8799499c469605734d3
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Tue Apr 20 23:48:40 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Wed Apr 21 01:17:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9a833575
7
8 sys-cluster/extrae: add nanos support
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 sys-cluster/extrae/extrae-3.8.3-r1.ebuild | 176 ++++++++++++++++++++++++++++++
14 sys-cluster/extrae/metadata.xml | 2 +-
15 2 files changed, 177 insertions(+), 1 deletion(-)
16
17 diff --git a/sys-cluster/extrae/extrae-3.8.3-r1.ebuild b/sys-cluster/extrae/extrae-3.8.3-r1.ebuild
18 new file mode 100644
19 index 000000000..4affa0895
20 --- /dev/null
21 +++ b/sys-cluster/extrae/extrae-3.8.3-r1.ebuild
22 @@ -0,0 +1,176 @@
23 +# Copyright 2019-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +PYTHON_COMPAT=( pypy3 python3_{7,8,9} )
29 +inherit autotools java-pkg-opt-2 python-single-r1
30 +
31 +DESCRIPTION="Instrumentation framework to generate execution traces of parallel runtimes"
32 +HOMEPAGE="https://github.com/bsc-performance-tools/extrae"
33 +SRC_URI="https://github.com/bsc-performance-tools/extrae/archive/${PV}.tar.gz -> ${P}.tar.gz"
34 +
35 +LICENSE="LGPL-2.1"
36 +SLOT="0"
37 +KEYWORDS="~amd64"
38 +IUSE="boost doc dwarf elf fft heterogeneous inotify +instrument-dynamic-memory +instrument-io +instrument-syscall merge-in-trace nanos opencl openmp +parallel-merge pebs-sampling +posix-clock pthread sampling +single-mpi-lib smpss +xml"
39 +#aspectj and aspectj-weaver needs to be enabled both at the same time but the aspectj package in gentoo doesn't have weaver
40 +#TODO: find out which FFT library is used
41 +#TODO: remove some useflags (boost fft elf dwarf)
42 +#TODO: pmapi online dyninst cuda spectral cupti openshmem gm mx synapse memkind sionlib aspectj
43 +#TODO: support llvm libunwind, llvm rt, elftoolchain
44 +
45 +CDEPEND="
46 + ${PYTHON_DEPS}
47 + dev-libs/icu
48 + sys-libs/libunwind
49 + dev-libs/libxml2
50 + dev-libs/papi
51 + sys-apps/hwloc
52 + sys-libs/glibc
53 + sys-libs/zlib
54 + virtual/mpi
55 +
56 + || ( sys-devel/binutils:* sys-libs/binutils-libs )
57 +
58 + boost? ( dev-libs/boost:= )
59 + dwarf? ( dev-libs/libdwarf )
60 + elf? ( virtual/libelf )
61 + nanos? ( sys-cluster/nanos6 )
62 + opencl? ( dev-util/opencl-headers )
63 +"
64 +DEPEND="
65 + ${CDEPEND}
66 + java? ( virtual/jdk:1.8 )
67 +"
68 +RDEPEND="
69 + ${CDEPEND}
70 + java? ( virtual/jre:1.8 )
71 + virtual/opencl
72 +"
73 +BDEPEND="
74 + doc? ( dev-python/sphinx )
75 +"
76 +REQUIRED_USE="
77 + ${PYTHON_REQUIRED_USE}
78 +"
79 +# cupti? ( cuda )
80 +# dyninst? ( boost dwarf elf )
81 +# online? ( synapse )
82 +# aspectj? ( java )
83 +# spectral? ( fft )
84 +
85 +src_prepare() {
86 + default
87 + eautoreconf
88 +}
89 +
90 +src_configure() {
91 + local myconf=(
92 + --datadir="${T}"
93 + --datarootdir="${T}"
94 + --libdir="${EPREFIX}/usr/$(get_libdir)/extrae/lib"
95 +
96 + --disable-mic
97 + --disable-online
98 + --disable-peruse
99 + --disable-pmapi
100 + --disable-static
101 +
102 + --enable-shared
103 +
104 + --with-librt="${EPREFIX}/usr"
105 + --with-mpi="${EPREFIX}/usr"
106 + --with-papi="${EPREFIX}/usr"
107 + --with-pic
108 + --with-unwind="${EPREFIX}/usr"
109 +
110 + --without-dyninst
111 + --without-cupti
112 + --without-memkind
113 + --without-clustering
114 + --without-java-aspectj
115 + --without-java-aspectj-weaver
116 + --without-synapse
117 + --without-spectral
118 + --without-openshmem
119 + --without-gm
120 + --without-mx
121 +
122 + $(use_enable doc)
123 + $(use_enable heterogeneous)
124 + $(use_enable inotify)
125 + $(use_enable instrument-dynamic-memory)
126 + $(use_enable instrument-io)
127 + $(use_enable instrument-syscall)
128 + $(use_enable merge-in-trace)
129 + $(use_enable nanos)
130 + $(use_enable openmp)
131 + $(use_enable sampling)
132 + $(use_enable parallel-merge)
133 + $(use_enable pebs-sampling)
134 + $(use_enable posix-clock)
135 + $(use_enable pthread)
136 + $(use_enable single-mpi-lib)
137 + $(use_enable smpss)
138 + $(use_enable xml)
139 + )
140 +# --without-sionlib
141 +#--with-pmpi-hook (Choose method to call PMPI (dlsym or pmpi))
142 +
143 + if use boost; then
144 + myconf+=( "--with-boost=${EPREFIX}/usr" )
145 + else
146 + myconf+=( "--without-boost" )
147 + fi
148 + if use dwarf; then
149 + myconf+=( "--with-dwarf=${EPREFIX}/usr" )
150 + else
151 + myconf+=( "--without-dwarf" )
152 + fi
153 + if use elf; then
154 + myconf+=( "--with-elf=${EPREFIX}/usr" )
155 + else
156 + myconf+=( "--without-elf" )
157 + fi
158 + if use fft; then
159 + myconf+=( "--with-fft=${EPREFIX}/usr" )
160 + else
161 + myconf+=( "--without-fft" )
162 + fi
163 + if use java; then
164 + myconf+=( "--with-java-jdk=$(java-config -O)" )
165 + else
166 + myconf+=( "--without-java-jdk" )
167 + fi
168 + if use opencl; then
169 + myconf+=( "--with-opencl=${EPREFIX}/usr" )
170 + else
171 + myconf+=( "--without-opencl" )
172 + fi
173 + econf "${myconf[@]}"
174 +}
175 +
176 +src_install() {
177 + default
178 +
179 + mkdir -p "${D}/$(python_get_sitedir)/" || die
180 + mv "${ED}/usr/libexec/pyextrae" "${D}/$(python_get_sitedir)/" || die
181 + python_optimize "${D}/$(python_get_sitedir)/pyextrae"
182 +
183 + #super-duper workaround
184 + mkdir -p "${ED}/usr/share/doc/${PF}" || die
185 + mv "${ED}/${T}/example" "${ED}/usr/share/doc/${PF}/examples" || die
186 + mv "${ED}/${T}/tests" "${ED}/usr/share/doc/${PF}/" || die
187 +
188 + if use doc ; then
189 + mv "${T}/docs"/* "${ED}/usr/share/doc/${PF}/" || die
190 + mv "${T}/man" "${ED}/usr/share/" || die
191 + docompress -x "/usr/share/doc/${PF}/html"
192 + fi
193 + docompress -x "/usr/share/doc/${PF}/examples"
194 + docompress -x "/usr/share/doc/${PF}/tests"
195 +
196 + find "${ED}" -name '*.a' -delete || die
197 + find "${ED}" -name '*.la' -delete || die
198 +}
199
200 diff --git a/sys-cluster/extrae/metadata.xml b/sys-cluster/extrae/metadata.xml
201 index 63ba6df57..fb390763b 100644
202 --- a/sys-cluster/extrae/metadata.xml
203 +++ b/sys-cluster/extrae/metadata.xml
204 @@ -31,7 +31,7 @@ process). Extrae generates trace files that can be later visualized with <pkg>sy
205 <flag name="instrument-syscall">Enables instrumentation for system calls (other than I/O and mallocs)</flag>
206 <flag name="java">Enable support for tracing Java. This is necessary to create the connectors between |TRACE| and Java applications.</flag>
207 <flag name="merge-in-trace">Embed the merging process in the tracing library so the final tracefile can be generated automatically from the application run</flag>
208 - <!--<flag name="nanos">Enable support for tracing <pkg>sys-cluster/nanos</pkg> run-time</flag>-->
209 + <flag name="nanos">Enable support for tracing <pkg>sys-cluster/nanos</pkg> run-time</flag>
210 <!--<flag name="online">Enable on-line analysis</flag>-->
211 <flag name="opencl">Enable support for tracing OpenCL</flag>
212 <flag name="openmp">Enable support for tracing OpenMP</flag>