diff --git a/0001-fix-configuration-issues-caused-by-version-mismatch.patch b/0001-fix-configuration-issues-caused-by-version-mismatch.patch new file mode 100644 index 0000000000000000000000000000000000000000..740aca86dae3c6054cb4f2062a03315fd457fe21 --- /dev/null +++ b/0001-fix-configuration-issues-caused-by-version-mismatch.patch @@ -0,0 +1,40 @@ +From c3467d0e3bc94603ab406c5294a4cd8594f64fb4 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Fri, 29 Dec 2023 17:20:59 +0800 +Subject: [PATCH] fix configuration issues caused by version mismatch + +Signed-off-by: herengui +--- + config/macros.m4 | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/config/macros.m4 b/config/macros.m4 +index 88db687..fa73ba7 100644 +--- a/config/macros.m4 ++++ b/config/macros.m4 +@@ -872,7 +872,11 @@ AC_DEFUN([AX_PROG_BINUTILS], + AC_MSG_CHECKING([whether libbfd and libiberty work]) + + if test "${OperatingSystem}" != "aix" -a "${OperatingSystem}" != "freebsd" ; then +- LIBS="-L${BFD_LIBSDIR} -lbfd -L${LIBERTY_LIBSDIR} -liberty ${LIBZ_LDFLAGS} ${LIBZ_LIBS}" ++ if test -f ${LIBERTY_LIBSDIR}/libiberty.so; then ++ LIBS="-L${BFD_LIBSDIR} -lbfd -L${LIBERTY_LIBSDIR} -liberty -lsframe ${LIBZ_LDFLAGS} ${LIBZ_LIBS}" ++ else ++ LIBS="-L${BFD_LIBSDIR} -lbfd ${LIBZ_LDFLAGS} ${LIBZ_LIBS} -L${LIBERTY_LIBSDIR} -static -liberty -lsframe" ++ fi + else + LIBS="-L${BFD_LIBSDIR} -lbfd -L${LIBERTY_LIBSDIR} -liberty ${LIBZ_LDFLAGS} ${LIBZ_LIBS} -lintl" + libbfd_needs_lintl="yes" +@@ -1693,8 +1697,8 @@ AC_DEFUN([AX_PROG_LIBDWARF], + if test -f "${DWARF_HOME}/include/libdwarf.h" -a \ + -f "${DWARF_HOME}/include/dwarf.h" ; then + libdwarf_found="yes" +- elif test -f "${DWARF_HOME}/include/libdwarf/libdwarf.h" -a \ +- -f "${DWARF_HOME}/include/libdwarf/dwarf.h" ; then ++ elif test -f "${DWARF_HOME}/include/libdwarf-0/libdwarf.h" -a \ ++ -f "${DWARF_HOME}/include/libdwarf-0/dwarf.h" ; then + libdwarf_found="yes" + else + AC_MSG_ERROR([Cannot find DWARF header files in ${dwarf_paths}/include]) +-- +2.33.0 diff --git a/0002-adapt-to-the-dyninst-new-version.patch b/0002-adapt-to-the-dyninst-new-version.patch new file mode 100644 index 0000000000000000000000000000000000000000..5e8d60be3b69a7299e39796dafe468cce556d2bf --- /dev/null +++ b/0002-adapt-to-the-dyninst-new-version.patch @@ -0,0 +1,29 @@ +From 116de8d136e3133f3558b27343df128c38e42697 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Fri, 29 Dec 2023 11:08:00 +0800 +Subject: [PATCH] adapt to the dyninst new version + +Signed-off-by: herengui +--- + src/launcher/dyninst/commonSnippets.C | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/launcher/dyninst/commonSnippets.C b/src/launcher/dyninst/commonSnippets.C +index 94904a2..2f7756f 100644 +--- a/src/launcher/dyninst/commonSnippets.C ++++ b/src/launcher/dyninst/commonSnippets.C +@@ -482,9 +482,9 @@ string decodeBasicBlocks(BPatch_function * function, string routine) + ParseAPI::Block* b = ParseAPI::convert(block); + void * buf = b->region()->getPtrToInstruction(b->start()); + InstructionAPI::InstructionDecoder dec((unsigned char*)buf,b->size(),b->region()->getArch()); +- InstructionAPI::Instruction::Ptr insn; +- while((insn = dec.decode())) { +- res <format() << endl; ++ InstructionAPI::Instruction insn; ++ while((insn = dec.decode()), insn.isValid()) { ++ res < +Date: Fri, 29 Dec 2023 11:23:30 +0800 +Subject: [PATCH] resolve the installation issue of the uncore module + +Signed-off-by: herengui +--- + src/extrae-uncore/Makefile.am | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/src/extrae-uncore/Makefile.am b/src/extrae-uncore/Makefile.am +index 4d97577..bf37150 100644 +--- a/src/extrae-uncore/Makefile.am ++++ b/src/extrae-uncore/Makefile.am +@@ -3,12 +3,10 @@ SUBDIRS = uncore-service + dist_bin_SCRIPTS = extrae-uncore.py + + install-data-hook: +- $(top_srcdir)/substitute $(SED) "@sub_PREFIXDIR@" "${prefix}" ${prefix}/bin/extrae-uncore.py +- $(top_srcdir)/substitute $(SED) "@sub_LIBDIR@" "${libdir}" ${prefix}/bin/extrae-uncore.py +- $(top_srcdir)/substitute $(SED) "@sub_PAPI_HOME@" "${PAPI_HOME}" ${prefix}/bin/extrae-uncore.py +- ln -fs ${prefix}/bin/extrae-uncore.py ${prefix}/bin/extrae-uncore +- chmod u+x ${prefix}/bin/extrae-uncore ++ $(top_srcdir)/substitute $(SED) "@sub_PREFIXDIR@" "${prefix}" $(DESTDIR)${prefix}/bin/extrae-uncore.py ++ $(top_srcdir)/substitute $(SED) "@sub_LIBDIR@" "${libdir}" $(DESTDIR)${prefix}/bin/extrae-uncore.py ++ $(top_srcdir)/substitute $(SED) "@sub_PAPI_HOME@" "${PAPI_HOME}" $(DESTDIR)${prefix}/bin/extrae-uncore.py + $(MKDIR_P) $(DESTDIR)$(sysconfdir) + cp extrae_uncore_template.xml $(DESTDIR)$(sysconfdir)/extrae_uncore_template.xml +- $(top_srcdir)/substitute $(SED) "@sub_PREFIXDIR@" "${prefix}" ${prefix}/etc/extrae_uncore_template.xml ++ $(top_srcdir)/substitute $(SED) "@sub_PREFIXDIR@" "${prefix}" $(DESTDIR)${prefix}/etc/extrae_uncore_template.xml + +-- +2.33.0 diff --git a/4.0.6.tar.gz b/4.0.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b3fe28d5f605af72782b9cafb4a06b642e76e5e5 Binary files /dev/null and b/4.0.6.tar.gz differ diff --git a/BSC-extrae.spec b/BSC-extrae.spec new file mode 100644 index 0000000000000000000000000000000000000000..17ede13f2590093413a96442b850648d702766e3 --- /dev/null +++ b/BSC-extrae.spec @@ -0,0 +1,137 @@ +%bcond_with tests + +Name: extrae +Version: 4.0.6 +Release: 1 +Summary: Instrumentation framework to generate execution traces of the parallel runtimes + +License: LGPL-2.1 +URL: https://tools.bsc.es/extrae +Source0: https://github.com/bsc-performance-tools/%{name}/archive/refs/tags/%{version}.tar.gz + +Patch1: 0001-fix-configuration-issues-caused-by-version-mismatch.patch +Patch2: 0002-adapt-to-the-dyninst-new-version.patch +Patch3: 0003-resolve-the-installation-issue-of-the-uncore-module.patch + +BuildRequires: gcc-c++ make autoconf automake libtool libdwarf-devel +BuildRequires: elfutils-devel binutils-devel libunwind-devel libxml2-devel +BuildRequires: java-11-openjdk-devel zlib-devel dyninst-devel memkind-devel +BuildRequires: boost-devel papi-devel chrpath libpfm-devel mpich-devel + +Requires: environment-modules mpich + +Requires(postun): coreutils + +%description +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 Paraver. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for developing. + + +%package static +Summary: Static libraries for %{name} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +The %{name}-static package contains static libraries for developing. + + +%prep +%autosetup -p1 + + +%build +./bootstrap +%configure --with-java-jdk=/usr/lib/jvm/java-11-openjdk \ + --with-mpi=%{_libdir}/mpich \ + --with-mpi-headers=%{_includedir}/mpich-%{_arch} \ + --with-unwind=%{_prefix} \ + --with-libz=%{_prefix} \ + --with-elf=%{_prefix} \ + --with-dwarf=%{_prefix} \ + --with-boost=%{_prefix} \ + --with-dyninst=%{_prefix} \ + --with-dyninst-headers=%{_includedir}/dyninst \ + --with-dyninst-libs=%{_libdir}/dyninst \ + --with-binutils=%{_prefix} \ + --with-papi=%{_prefix} \ + --with-xml=%{_prefix} \ + --with-memkind=%{_prefix} \ + --with-gnu-ld \ + LIBS="-lsframe" || cat config.log + +%make_build + + +%check +%if %{with tests} +%make_build check +%endif + + +%install +%make_install + +pushd %{buildroot}%{_bindir} || exit 1 +%__ln_s -f -T extrae-uncore.py extrae-uncore +popd + +find %{buildroot}%{_bindir} %{buildroot}%{_libdir} -maxdepth 1 -type f -print0 | + xargs -0 -I{} file {} | grep -E '\' | cut -d: -f1 | + xargs -I{} chrpath -d {} + +# Do not install tests +%__rm -rf %{buildroot}%{_datadir}/tests + +install -d -p -m 0755 %{buildroot}%{_datadir}/%{name} +[ -d %{buildroot}%{_datadir}/example ] && + %__mv -f %{buildroot}%{_datadir}/example %{buildroot}%{_datadir}/%{name}/ + +install -d -p -m 0755 %{buildroot}%{_sysconfdir}/%{name} +%__mv -ft %{buildroot}%{_sysconfdir}/%{name}/ \ + %{buildroot}%{_sysconfdir}/{configured,extrae,extrae-vars}.sh \ + %{buildroot}%{_sysconfdir}/extrae_uncore_template.xml + +%delete_la + +find %{buildroot}%{_libdir} -maxdepth 1 -type l -print0 | + tr '\0' '\n' | while read -r line; do + echo ${line##%{buildroot}} >> .devel-filelists + done + + +%files +%license COPYING +%doc README NEWS RELEASE-PROCEDURE +%attr(0755, -, -) %{_bindir}/* +%attr(0755, -, -) %{_libdir}/*-%{version}.so +%{_libexecdir}/pyextrae +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/example +%dir %{_sysconfdir}/%{name} +%attr(0644, -, -) %{_sysconfdir}/%{name}/*.sh +%{_sysconfdir}/%{name}/extrae_uncore_template.xml + + +%files -f .devel-filelists devel +%{_includedir}/* +%attr(0644, -, -) %{_libdir}/javatrace.jar + + +%files static +%attr(0644, -, -) %{_libdir}/*.a + + +%changelog +* Fri Dec 29 2023 herengui - 4.0.6-1 +- Initial package