commit: d7cf0960683b3e248fb094a5e1e4c8b5d2518777 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> AuthorDate: Mon Apr 19 01:11:30 2021 +0000 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> CommitDate: Mon Apr 19 01:11:30 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d7cf0960
sys-cluster/extrae: new package very WIP TODO: fix rpath Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> sys-cluster/extrae/Manifest | 1 + sys-cluster/extrae/extrae-3.8.3.ebuild | 175 +++++++++++++++++++++++++++++++++ sys-cluster/extrae/metadata.xml | 50 ++++++++++ 3 files changed, 226 insertions(+) diff --git a/sys-cluster/extrae/Manifest b/sys-cluster/extrae/Manifest new file mode 100644 index 000000000..17608e9bc --- /dev/null +++ b/sys-cluster/extrae/Manifest @@ -0,0 +1 @@ +DIST extrae-3.8.3.tar.gz 1056317 BLAKE2B 9efe7011ba9474de66deb8c679f10eff37cc3d5699b42cb1b076ed43b539bbc15ecc613b3f17b03df9e93a219ebcafd3e1d56229db9c0d4e7a0a56d5c3edd591 SHA512 3fba66447790e0a1c71c0e5a61f67ad966cdd4e19742799ecc50124a916ef599fff747027ccc803584f0ab2d1d76c29ded7072a70dd0aed5a3be7ff6ecbb8709 diff --git a/sys-cluster/extrae/extrae-3.8.3.ebuild b/sys-cluster/extrae/extrae-3.8.3.ebuild new file mode 100644 index 000000000..7d5340273 --- /dev/null +++ b/sys-cluster/extrae/extrae-3.8.3.ebuild @@ -0,0 +1,175 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{7,8,9} ) +inherit autotools java-pkg-opt-2 python-single-r1 + +DESCRIPTION="Instrumentation framework to generate execution traces of the most used parallel runtimes" +HOMEPAGE="https://github.com/bsc-performance-tools/extrae" +SRC_URI="https://github.com/bsc-performance-tools/extrae/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64" +#TODO: correctly install python stuff +IUSE="boost doc dwarf elf fft heterogeneous inotify +instrument-dynamic-memory +instrument-io +instrument-syscall merge-in-trace opencl openmp +parallel-merge pebs-sampling +posix-clock pthread sampling +single-mpi-lib smpss +xml" +#aspectj and aspectj-weaver needs to be enabled both at the same time but the aspectj package in gentoo doesn't have weaver +#TODO: find out which FFT library is used +#TODO: remove some useflags (boost fft elf dwarf) +#TODO: nanos pmapi online dyninst cuda spectral cupti openshmem gm mx synapse memkind sionlib aspectj +#TODO: support llvm libunwind, llvm rt, elftoolchain + +CDEPEND=" + ${PYTHON_DEPS} + dev-libs/icu + sys-libs/libunwind + dev-libs/libxml2 + dev-libs/papi + sys-apps/hwloc + sys-libs/glibc + sys-libs/zlib + virtual/mpi + || ( sys-devel/binutils:* sys-libs/binutils-libs ) + boost? ( dev-libs/boost:= ) + dwarf? ( dev-libs/libdwarf ) + elf? ( virtual/libelf ) + opencl? ( dev-util/opencl-headers ) +" +DEPEND=" + ${CDEPEND} + java? ( virtual/jdk:1.8 ) +" +RDEPEND=" + ${CDEPEND} + java? ( virtual/jre:1.8 ) + virtual/opencl +" +BDEPEND=" + doc? ( dev-python/sphinx ) +" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} +" +# cupti? ( cuda ) +# dyninst? ( boost dwarf elf ) +# online? ( synapse ) +# aspectj? ( java ) +# spectral? ( fft ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myconf=( + --datadir="${T}" + --datarootdir="${T}" + --libdir="${EPREFIX}/usr/$(get_libdir)/extrae" + + --disable-mic + --disable-nanos + --disable-online + --disable-peruse + --disable-pmapi + --disable-static + + --enable-shared + + --with-librt="${EPREFIX}/usr" + --with-mpi="${EPREFIX}/usr" + --with-papi="${EPREFIX}/usr" + --with-pic + --with-unwind="${EPREFIX}/usr" + + --without-dyninst + --without-cupti + --without-memkind + --without-clustering + --without-java-aspectj + --without-java-aspectj-weaver + --without-synapse + --without-spectral + --without-openshmem + --without-gm + --without-mx + + $(use_enable doc) + $(use_enable heterogeneous) + $(use_enable inotify) + $(use_enable instrument-dynamic-memory) + $(use_enable instrument-io) + $(use_enable instrument-syscall) + $(use_enable merge-in-trace) + $(use_enable openmp) + $(use_enable sampling) + $(use_enable parallel-merge) + $(use_enable pebs-sampling) + $(use_enable posix-clock) + $(use_enable pthread) + $(use_enable single-mpi-lib) + $(use_enable smpss) + $(use_enable xml) + ) +# $(use_enable nanos) +# --without-sionlib +#--with-pmpi-hook (Choose method to call PMPI (dlsym or pmpi)) + + if use boost; then + myconf+=( "--with-boost=${EPREFIX}/usr" ) + else + myconf+=( "--without-boost" ) + fi + if use dwarf; then + myconf+=( "--with-dwarf=${EPREFIX}/usr" ) + else + myconf+=( "--without-dwarf" ) + fi + if use elf; then + myconf+=( "--with-elf=${EPREFIX}/usr" ) + else + myconf+=( "--without-elf" ) + fi + if use fft; then + myconf+=( "--with-fft=${EPREFIX}/usr" ) + else + myconf+=( "--without-fft" ) + fi + if use java; then + myconf+=( "--with-java-jdk=$(java-config -O)" ) + else + myconf+=( "--without-java-jdk" ) + fi + if use opencl; then + myconf+=( "--with-opencl=${EPREFIX}/usr" ) + else + myconf+=( "--without-opencl" ) + fi + econf "${myconf[@]}" +} + +src_install() { + default + + mkdir -p "${ED}/$(python_get_sitedir)/" || die + mv "${ED}/usr/libexec/pyextrae" "${ED}/$(python_get_sitedir)/" || die + python_optimize "${ED}/$(python_get_sitedir)/pyextrae" + + #super-duper workaround + mkdir -p "${ED}/usr/share/doc/${PF}" || die + mv "${ED}/${T}/example" "${ED}/usr/share/doc/${PF}/examples" || die + mv "${ED}/${T}/tests" "${ED}/usr/share/doc/${PF}/" || die + + if use doc ; then + mv "${T}/docs"/* "${ED}/usr/share/doc/${PF}/" || die + mv "${T}/man" "${ED}/usr/share/" || die + docompress -x "/usr/share/doc/${PF}/html" + fi + docompress -x "/usr/share/doc/${PF}/examples" + docompress -x "/usr/share/doc/${PF}/tests" + + find "${ED}" -name '*.a' -delete || die + find "${ED}" -name '*.la' -delete || die +} diff --git a/sys-cluster/extrae/metadata.xml b/sys-cluster/extrae/metadata.xml new file mode 100644 index 000000000..63ba6df57 --- /dev/null +++ b/sys-cluster/extrae/metadata.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lssndrbarbi...@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <longdescription> +A dynamic instrumentation package to trace programs compiled and run with the shared +memory model (like OpenMP and pthreads), the message passing (MPI) programming model or +both programming models (different MPI processes using OpenMP or pthreads within each MPI +process). Extrae generates trace files that can be later visualized with <pkg>sys-cluster/paraver</pkg>. + </longdescription> + <upstream> + <bugs-to>https://github.com/bsc-performance-tools/extrae/issues</bugs-to> + <remote-id type="github">bsc-performance-tools/extrae</remote-id> + </upstream> + <use> + <flag name="boost">Search for boost</flag> + <flag name="doc">Generates the documentation of this instrumentation package</flag> + <!--<flag name="cuda">Enable support for tracing CUDA calls on nVidia hardware and needs to point to the CUDA SDK installation path. This instrumentation is only valid in binaries that use the shared version of the CUDA library.</flag>--> + <!--<flag name="cupti">CUPTI is used to instrument CUDA calls</flag>--> + <flag name="dwarf">Build with <pkg>dev-libs/libdwarf</pkg></flag> + <!--<flag name="dyninst">Build with dyninst</flag>--> + <flag name="elf">Build with <pkg>virtual/libelf</pkg></flag> + <flag name="fft">Search for FFT package (which?)</flag> + <flag name="heterogeneous">Enable support for heterogeneous tracing</flag> + <flag name="inotify">Enable inotify support</flag> + <flag name="instrument-dynamic-memory">Enables instrumentation for dynamic memory (malloc, free, realloc) calls</flag> + <flag name="instrument-io">Enables instrumentation for basic I/O (read, write) calls</flag> + <flag name="instrument-syscall">Enables instrumentation for system calls (other than I/O and mallocs)</flag> + <flag name="java">Enable support for tracing Java. This is necessary to create the connectors between |TRACE| and Java applications.</flag> + <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> + <!--<flag name="nanos">Enable support for tracing <pkg>sys-cluster/nanos</pkg> run-time</flag>--> + <!--<flag name="online">Enable on-line analysis</flag>--> + <flag name="opencl">Enable support for tracing OpenCL</flag> + <flag name="openmp">Enable support for tracing OpenMP</flag> + <flag name="parallel-merge">Build the parallel mergers (mpimpi2prv/mpimpi2dim) based on MPI</flag> + <flag name="pebs-sampling">enable PEBS sampling</flag> + <!--<flag name="pmapi">Enable PMAPI library to gather CPU performance counters</flag>--> + <flag name="posix-clock">Use POSIX clock (clock_gettime call) instead of low level timing routines. Use this option if the system where you install the instrumentation package modifies the frequency of its processors at runtime.</flag> + <flag name="pthread">Enable support for tracing pthread library</flag> + <flag name="sampling">Enable PAPI sampling support</flag> + <!--<flag name="spectral">This package enables support for on-line spectral analysis.</flag>--> + <flag name="single-mpi-lib">Produces a single instrumentation library for MPI that contains both Fortran and C wrappers. Applications that call the MPI library from both C and Fortran languages need this flag to be enabled.</flag> + <flag name="smpss">Enable support for tracing SMP-superscalar</flag> + <!--<flag name="synapse">This library is a front-end of the MRNet library</flag>--> + <flag name="xml">Enable support for XML configuration</flag> + </use> +</pkgmetadata>