Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[PATCH] add intel-trace-analyzer-and-collector package
From ff7528a6c679eef87d4587b1050ea7b38fcfea46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <j.l.k@gmx.com>
Date: Sun, 28 Jun 2020 13:04:23 +0200
Subject: [PATCH] add intel-trace-analyzer-and-collector package
---
PKGBUILD | 56 ++++++++++++++++++++++++-
intel_trace-analyzer-and-collector.conf | 1 +
intel_trace-analyzer-and-collector.sh | 2 +
3 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 intel_trace-analyzer-and-collector.conf
create mode 100644 intel_trace-analyzer-and-collector.sh
diff --git a/PKGBUILD b/PKGBUILD
index c3dcf99..c30deb6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -48,7 +48,8 @@ pkgname=('intel-common-libs'
'intel-tbb_psxe'
'intel-advisor'
'intel-vtune-profiler'
- 'intel-inspector')
+ 'intel-inspector'
+ 'intel-trace-analyzer-and-collector')
if [ -z "$FORCE_PKGEXT" ]; then
PKGEXT='.pkg.tar.lzo'
@@ -95,6 +96,7 @@ _icc_ver='19.1.1'
_vtune_ver='2020.1.0.607630'
_inspector_ver='2020.1.0.604266'
_advisor_ver='2020.1.0.605410'
+_itac_ver='2020.1.024'
pkgver=${_year}.${_v_a}.${_v_b}
@@ -116,6 +118,8 @@ source=(
'intel_vtune-profiler.sh'
'intel_advisor.sh'
'intel_inspector.sh'
+ 'intel_trace-analyzer-and-collector.sh'
+ 'intel_trace-analyzer-and-collector.conf'
'intel-composer.install'
'intel-common-libs.conf'
'intel-fortran.conf'
@@ -132,6 +136,8 @@ sha256sums=('fd11d8de72b2bd60474f8bce7b463e4cbb2255969b9eaf24f689575aa2a2abab'
'12f932f99e6d3ee9dd828b95e630f096a9e58707db39bea15fba22a1ad80f211'
'63b12c66d9c8c2310a7bbd5206c82ba9667fb6ffb3dc7e3f9304a17ed8c8fbcd'
'fd24842f29d50bc53779dd918fbc548ebf165ff664114e59195773ad04076b5d'
+ '13fbca61cf66acf58af2843e9c4b33d67bda4ad160f6f9c16613d5f5620fcae3'
+ '718792fc7b0d15f70793069224adb612868ae0d430f8f97c3511878b38748ec7'
'3f96dec03111e69d16bb363acf4d0570e8a9526c09e5e542a7558f1b26d043ef'
'31ac4d0f30a93fe6393f48cb13761d7d1ce9719708c76a377193d96416bed884'
'6151bc273b6f741a4ce93d8160b6f167c8ad499dbc6e8e3f6e08d48571d6a52a'
@@ -702,6 +708,54 @@ package_intel-inspector() {
mv ${xe_build_dir}/etc ${pkgdir}/
mv ${xe_build_dir}/usr ${pkgdir}/
}
+
+package_intel-trace-analyzer-and-collector() {
+ set_build_vars
+ pkgdesc="MPI profiling for cluster applications $_itac_ver"
+ depends=('qt5-base' 'libxcb' 'libxkbcommon')
+
+ mkdir -p ${xe_build_dir}
+ cd ${xe_build_dir}
+ mkdir -p ./opt
+ mkdir -p ./etc/ld.so.conf.d
+ mkdir -p ./etc/profile.d
+ mkdir -p ${_man_dir}
+
+ msg2 "Updating scripts"
+ sed -e "s/<arch>/${_i_arch}/g" -e "s/<ver>/${_itac_ver}/g" \
+ < ${srcdir}/intel_trace-analyzer-and-collector.conf > ./etc/ld.so.conf.d/intel_trace-analyzer-and-collector.conf
+ sed -e "s/<arch>/${_i_arch}/g" -e "s/<ver>/${_itac_ver}/g" \
+ < ${srcdir}/intel_trace-analyzer-and-collector.sh > ./etc/profile.d/intel_trace-analyzer-and-collector.sh
+ chmod a+x ./etc/profile.d/intel_trace-analyzer-and-collector.sh
+
+ msg2 "Extracting RPMS"
+ extract_rpms 'intel-trace-*.rpm' $xe_build_dir
+
+ cd ${xe_build_dir}/opt/intel/itac/${_itac_ver}
+
+ # remove Qt5 and xcb and xkb libraries
+ rm -fr ${_i_arch}/bin/platforms
+ rm -f ${_i_arch}/bin/rtlib/libQt5*
+ rm -f ${_i_arch}/bin/rtlib/libxcb*
+ rm -f ${_i_arch}/bin/rtlib/libxkb*
+
+ msg2 "Copying man pages"
+ if [[ -d ./man/man1 ]]; then
+ cp ./man/man1/*.1 ${_man_dir}/
+ fi
+
+
+ if $_remove_docs ; then
+ msg2 "Removing documentation"
+ rm -rf ./examples
+ fi
+
+ msg2 "Moving package files"
+ mv ${xe_build_dir}/opt ${pkgdir}/
+ mv ${xe_build_dir}/etc ${pkgdir}/
+ mv ${xe_build_dir}/usr ${pkgdir}/
+}
+
pkgdesc="Intel C++ C and FORTRAN compiler - Intel Parallel Studio XE - Cluster Edition - icc icpc ifort ipp"
depends=('bash' 'gcc')
diff --git a/intel_trace-analyzer-and-collector.conf b/intel_trace-analyzer-and-collector.conf
new file mode 100644
index 0000000..c54a2c5
--- /dev/null
+++ b/intel_trace-analyzer-and-collector.conf
@@ -0,0 +1 @@
+/opt/intel/itac/<ver>/<arch>/slib
diff --git a/intel_trace-analyzer-and-collector.sh b/intel_trace-analyzer-and-collector.sh
new file mode 100644
index 0000000..6cdf833
--- /dev/null
+++ b/intel_trace-analyzer-and-collector.sh
@@ -0,0 +1,2 @@
+PATH=$PATH:/opt/intel/itac/<ver>/<arch>/bin
+export PATH
--
2.27.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment