Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373607 - sys-apps/likwid: new package for Lightweight performance tools
Summary: sys-apps/likwid: new package for Lightweight performance tools
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Brendan Horan
URL: http://code.google.com/p/likwid/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2011-06-30 15:46 UTC by Ruggero Morsucci
Modified: 2015-03-06 14:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
likwid-2.2.1 ebuild (likwid-2.2.1.ebuild,780 bytes, text/plain)
2011-06-30 15:49 UTC, Ruggero Morsucci
Details
likwid-2.3.0.ebuild (likwid-2.3.0.ebuild,3.48 KB, text/plain)
2012-04-07 13:13 UTC, Erich Seifert
Details
likwid-3.1.3.ebuild (likwid-3.1.3.ebuild,1.22 KB, text/plain)
2015-03-04 09:01 UTC, Brendan Horan
Details
likwid-3.1.3-accessClient.patch (likwid-3.1.3-accessClient.patch,396 bytes, patch)
2015-03-04 09:06 UTC, Brendan Horan
Details | Diff
likwid-3.1.3-include_GCC.patch (likwid-3.1.3-include_GCC.patch,411 bytes, patch)
2015-03-04 09:08 UTC, Brendan Horan
Details | Diff
likwid-3.1.3-Makefile.patch (likwid-3.1.3-Makefile.patch,2.74 KB, patch)
2015-03-04 09:09 UTC, Brendan Horan
Details | Diff
likwid-3.1.3.ebuild (likwid-3.1.3.ebuild,1.22 KB, text/plain)
2015-03-04 09:14 UTC, Brendan Horan
Details
likwid-3.1.3.ebuild refined (likwid-3.1.3.ebuild,1.48 KB, text/plain)
2015-03-05 06:20 UTC, Yixun Lan
Details
likwid-3.1.3-fix-gnustack.patch (likwid-3.1.3-fix-gnustack.patch,933 bytes, patch)
2015-03-05 08:12 UTC, Yixun Lan
Details | Diff
likwid-3.1.3.ebuild (likwid-3.1.3.ebuild,1.70 KB, text/plain)
2015-03-05 23:54 UTC, Brendan Horan
Details
likwid-3.1.3-Makefile.patch (likwid-3.1.3-Makefile.patch,2.77 KB, patch)
2015-03-05 23:55 UTC, Brendan Horan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruggero Morsucci 2011-06-30 15:46:07 UTC
Likwid stands for Like I knew what I am doing. This project contributes easy to use command line tools for Linux to support programmers in developing high performance multi threaded programs.

It contains the following tools: 
likwid-topology: Show the thread and cache topology 
likwid-perfctr: Measure hardware performance counters on Intel and AMD processors 
likwid-features: Show and Toggle hardware prefetch control bits on Intel Core 2 processors 
likwid-pin: Pin your threaded application without touching your code (supports pthreads, Intel OpenMP and gcc OpenMP) 
likwid-bench: Benchmarking framework allowing rapid prototyping of threaded assembly kernels 
likwid-mpirun: Script enabling simple and flexible pinning of MPI and MPI/threaded hybrid applications 
likwid-perfscope: Frontend for likwid-perfctr timeline mode. Allows live plotting of performance metrics. 

Likwid stands out because: 
No kernel patching, any vanilla linux 2.6 kernel works 
Transparent, always clear which events are chosen, event tags have the same naming as in documentation 
Lightweight, LIKWID tries to add no overhead and keeps out of your way. 
Easy to use, simple to build, no need to touch your code, configurable from outside. Clear CLI interface. 
Multiplatform, likwid supports Intel and AMD processors 
Up to date, likwid tries to fully support new processors as soon as possible 
Extensible, you can add functionality by means of simple text files

Reproducible: Always
Comment 1 Ruggero Morsucci 2011-06-30 15:49:26 UTC
Created attachment 278717 [details]
likwid-2.2.1 ebuild
Comment 2 Erich Seifert 2012-04-07 13:13:49 UTC
Created attachment 308089 [details]
likwid-2.3.0.ebuild

Added ebuild for version 2.3.0 with more USE flags and dependencies
Comment 3 Brendan Horan 2015-03-04 05:25:47 UTC
ebuild needs some work and cleanup as part of a bump to 3.1.3 I will do this.
Comment 4 Brendan Horan 2015-03-04 09:01:35 UTC
Created attachment 398002 [details]
likwid-3.1.3.ebuild

New ebuild for likwid 3.1.3

I need to update patches as well.

A lot has changed.
Lot's of the previous use flags don't apply or should not be exposed anymore.
Comment 5 Brendan Horan 2015-03-04 09:06:49 UTC
Created attachment 398004 [details, diff]
likwid-3.1.3-accessClient.patch

This patch fix's the client apps path to "likwid-accessD".
Its hard coded in each app.

Sets the correct path to the likwid-accessD.
With out this the client apps end up with a garbage path and causing them to fail.
Comment 6 Brendan Horan 2015-03-04 09:08:10 UTC
Created attachment 398006 [details, diff]
likwid-3.1.3-include_GCC.patch

This adds "-Wa,--noexecstack" to the CFLAGS.
Not sure this is the best way to solve this.

Using "flag-o-matic" did not get me the desired outcome.
Comment 7 Brendan Horan 2015-03-04 09:09:58 UTC
Created attachment 398008 [details, diff]
likwid-3.1.3-Makefile.patch

Remove old "/usr/man" man page install.
Used one SED line to update the man pages. (for date and version strings)

This is now taken care of by "doman" inside the ebuild.
Comment 8 Brendan Horan 2015-03-04 09:11:38 UTC
Asking for version bump to 3.1.3 and to be entered into the portage tree.
Assuming all is ok :)
Comment 9 Brendan Horan 2015-03-04 09:14:30 UTC
Created attachment 398010 [details]
likwid-3.1.3.ebuild

woops, had a ARCH error
Comment 10 Yixun Lan gentoo-dev 2015-03-05 06:20:41 UTC
Created attachment 398108 [details]
likwid-3.1.3.ebuild refined

I slightly refine the ebuild although a few changes are really minor
1) explicitly put sys-apps/sed into DEPEND
2) call "|| die" if using external app (not bash)
3) convert simple patch to sed operations (slightly reduce the patchset)
4) fix multilib restrict err, call $(get_libdir)


still with USE=fortran enabled, I got this err, also one warning

===> INSTALL man pages
===> INSTALL libraries to /var/tmp/portage/sys-apps/likwid-3.1.3-r1/image//usr/lib
===> INSTALL filters to /var/tmp/portage/sys-apps/likwid-3.1.3-r1/image/usr/share/likwid
install: cannot stat ‘likwid.mod’: No such file or directory
!!! doins: likwid.mod does not exist
 * ERROR: sys-apps/likwid-3.1.3-r1::gentoo failed (install phase):
 *   doins failed
 * 

 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some
 *  architectures/operating systems.  A bug should be filed at
 *  http://bugs.gentoo.org/ to make sure the issue is fixed.
 *  For more information, see http://hardened.gentoo.org/gnu-stack.xml
 *  Please include the following list of files in your report:
 *  Note: Bugs should be filed for the respective maintainers
 *  of the package in question and not hardened@g.o.
 * !WX --- --- usr/lib64/liblikwid.a:loadData.o
 * RWX --- --- usr/bin/likwid-bench
 * RWX --- --- usr/bin/likwid-pin
 * RWX --- --- usr/bin/likwid-genCfg
 * RWX --- --- usr/bin/likwid-topology
 * RWX --- --- usr/bin/likwid-memsweeper
 * RWX --- --- usr/bin/likwid-powermeter
 * RWX --- --- usr/bin/likwid-features
 * RWX --- --- usr/bin/likwid-perfctr
Comment 11 Brendan Horan 2015-03-05 07:25:33 UTC
(In reply to Yixun Lan from comment #10)
> Created attachment 398108 [details]
> likwid-3.1.3.ebuild refined
> 
> I slightly refine the ebuild although a few changes are really minor
> 1) explicitly put sys-apps/sed into DEPEND
> 2) call "|| die" if using external app (not bash)
> 3) convert simple patch to sed operations (slightly reduce the patchset)
> 4) fix multilib restrict err, call $(get_libdir)
> 
> 
> still with USE=fortran enabled, I got this err, also one warning
> 
> ===> INSTALL man pages
> ===> INSTALL libraries to
> /var/tmp/portage/sys-apps/likwid-3.1.3-r1/image//usr/lib
> ===> INSTALL filters to
> /var/tmp/portage/sys-apps/likwid-3.1.3-r1/image/usr/share/likwid
> install: cannot stat ‘likwid.mod’: No such file or directory
> !!! doins: likwid.mod does not exist
>  * ERROR: sys-apps/likwid-3.1.3-r1::gentoo failed (install phase):
>  *   doins failed
>  * 
> 
>  * QA Notice: The following files contain writable and executable sections
>  *  Files with such sections will not work properly (or at all!) on some
>  *  architectures/operating systems.  A bug should be filed at
>  *  http://bugs.gentoo.org/ to make sure the issue is fixed.
>  *  For more information, see http://hardened.gentoo.org/gnu-stack.xml
>  *  Please include the following list of files in your report:
>  *  Note: Bugs should be filed for the respective maintainers
>  *  of the package in question and not hardened@g.o.
>  * !WX --- --- usr/lib64/liblikwid.a:loadData.o
>  * RWX --- --- usr/bin/likwid-bench
>  * RWX --- --- usr/bin/likwid-pin
>  * RWX --- --- usr/bin/likwid-genCfg
>  * RWX --- --- usr/bin/likwid-topology
>  * RWX --- --- usr/bin/likwid-memsweeper
>  * RWX --- --- usr/bin/likwid-powermeter
>  * RWX --- --- usr/bin/likwid-features
>  * RWX --- --- usr/bin/likwid-perfctr

Wow thank you Yixun Lan!

I will try fix the Fortran issue.

Not sure about the QA warnings, I've added "-Wa,--noexecstack" in the build file for the listed binary's.. hmm
Comment 12 Yixun Lan gentoo-dev 2015-03-05 08:12:46 UTC
Created attachment 398118 [details, diff]
likwid-3.1.3-fix-gnustack.patch

this is a slightly dirty patch which should fix gnustack warning, tested, and works here. 

Brendan, can you still verify if the program still works (do a run-time test)? I'd assume it should yield a "Yes"

btw, it's always a good idea to push these patches/changes back to upstream, thus you get much clean ebuild at next release cycle.

thanks
Comment 13 Brendan Horan 2015-03-05 08:35:55 UTC
(In reply to Yixun Lan from comment #12)
> Created attachment 398118 [details, diff] [details, diff]
> likwid-3.1.3-fix-gnustack.patch
> 
> this is a slightly dirty patch which should fix gnustack warning, tested,
> and works here. 
> 
> Brendan, can you still verify if the program still works (do a run-time
> test)? I'd assume it should yield a "Yes"
> 
> btw, it's always a good idea to push these patches/changes back to upstream,
> thus you get much clean ebuild at next release cycle.
> 
> thanks

Thanks for the patch. I will try understand it a bit more before I push back to upstream.

The applications work with the patch, so nothing is broken by the patch.

On a side note I still can't get it build the Fortran module .

Thanks
brendan
Comment 14 Brendan Horan 2015-03-05 08:43:08 UTC
> On a side note I still can't get it build the Fortran module .
> 
> Thanks
> brendan

Never mind.. I've worked this out, will need a little while to update the ebuild
Comment 15 Brendan Horan 2015-03-05 23:54:46 UTC
Created attachment 398198 [details]
likwid-3.1.3.ebuild

No more QA warnings.
Fortran module now gets built and installed correctly (via use flag)
No other errors or warnings during merge

No repoman warnings.

I will update the Makefile patch next.

This should be good to go :)
Comment 16 Brendan Horan 2015-03-05 23:55:43 UTC
Created attachment 398200 [details, diff]
likwid-3.1.3-Makefile.patch

Updated the Makefile patch for Fortran fix.
Comment 17 Brendan Horan 2015-03-05 23:58:35 UTC
Just encase the attachments look messy :

Correct ebuild file is :
* likwid-3.1.3.ebuild (1.70 KB, text/plain) 

Required patches are :
* likwid-3.1.3-Makefile.patch (2.74 KB, patch) 
* likwid-3.1.3-fix-gnustack.patch (933 bytes, patch) 

Nothing else is needed.
Comment 18 Yixun Lan gentoo-dev 2015-03-06 14:54:42 UTC
+*likwid-3.1.3 (06 Mar 2015)
+
+  06 Mar 2015; Yixun Lan <dlan@gentoo.org> +likwid-3.1.3.ebuild,
+  +files/likwid-3.1.3-Makefile.patch, +files/likwid-3.1.3-fix-gnustack.patch,
+  +metadata.xml:
+  initial ebuild, contributed by Brendan Horan, but 373607

btw, I drop noexecstack's sed operation[1], with the gnustack patch, it's not needed, let me know if have problem with this

[1] 
sed -e "/^CFLAGS/s|$| -Wa,--noexecstack|"  \
	-i make/include_GCC.mk || die