likwid-perfctr not outputting to file

42 views
Skip to first unread message

David Stansby

unread,
Nov 17, 2022, 6:01:58 AM11/17/22
to likwid-users
I'm trying to get likwid-perfctr to output to a file. If I run likwid-perfctr without the option to output to a file, I get expected results printed to the terminal:

$ likwid-perfctr -c 0 -group ENERGY -t 100ms -O sleep 1
--------------------------------------------------------------------------------
CPU name:    AMD EPYC 7502 32-Core Processor                
CPU type:    AMD K17 (Zen2) architecture
CPU clock:    2.50 GHz
ERROR: The selected register PMC0 is in use.
Please run likwid with force option (-f, --force) to overwrite settings
--------------------------------------------------------------------------------
# Cores: 0
# GID|MetricsCount|CpuCount|Total runtime [s]|Runtime (RDTSC) [s]|Runtime unhalted [s]|Clock [MHz]|CPI|Energy Core [J]|Power Core [W]|Energy PKG [J]|Power PKG [W]
Sleeping longer as likwid_sleep() called without prior initialization
Sleeping longer as likwid_sleep() called without prior initialization
1,8,1,0.10057131209589,0.10058336452893,0.0032653581693631,3335.9043398884,-,0.018310546875,0.18204349159282,5.9067230224609,58.72465143838
1,8,1,0.20057022879957,0.099847875572751,0.0033421903761662,3337.8647380689,-,0.018112182617188,0.18139777650042,5.8373870849609,58.462807060003
1,8,1,0.30056672099053,0.099853976929127,0.00319467100024,3334.2304126908,-,0.01788330078125,0.1790945271408,5.7885589599609,57.970239523554
1,8,1,0.40056244174562,0.099874525175315,0.0033063204118607,3338.0324625085,-,0.0179443359375,0.17966879848491,5.8374328613281,58.447665719375
1,8,1,0.50056042671507,0.099881327837022,0.0032784801932181,3338.4784221158,-,0.01824951171875,0.18271194540513,5.8418579101562,58.487988062078
1,8,1,0.6005601348919,0.099871008630014,0.0032067683168205,3339.886587393,-,0.0179443359375,0.17967512477998,5.8404998779297,58.480433491631
1,8,1,0.70055605601995,0.099882439906903,0.0032959370855083,3336.8823856603,-,0.017929077148438,0.17950179396046,5.8401489257812,58.470226911003
1,8,1,0.80055121573078,0.099878753044594,0.0032798042576824,3340.7554869818,-,0.01788330078125,0.17905010060814,5.7868804931641,57.939054270935
1,8,1,0.90054862963732,0.099886627701592,0.0032239370728063,3334.1363241777,-,0.017929077148438,0.17949426826181,5.8401031494141,58.467317235508
1,8,1,1.0005463641406,0.099887579473112,0.0033088639461085,3339.3009694964,-,0.017974853515625,0.17995083683516,5.8420257568359,58.486007846536
--------------------------------------------------------------------------------

But when I try and output to a file using likwid-perfctr -c 0 -group ENERGY -t 100ms -O -o likwid_output.csv sleep 1 the output file is created, but doesn't contain anything. The output to the terminal in this case is:

$ likwid-perfctr -c 0 -group ENERGY -t 100ms -O -o likwid_output.csv sleep 1
ERROR: The selected register PMC0 is in use.
Please run likwid with force option (-f, --force) to overwrite settings
Sleeping longer as likwid_sleep() called without prior initialization
Sleeping longer as likwid_sleep() called without prior initialization

Does anyone know what's going on here, and how I can get likwid-perfctr to output to a file?

All the best,
David

Thomas Gruber

unread,
Dec 15, 2022, 10:11:07 AM12/15/22
to likwid-users
Hi,

The output file option is simply not usable with timeline mode. The output option redirects the table output to the file, not the samples. The timeline mode does not create these tables and outputs the samples to stderr, so you have to redirect stderr to a file to record it.

The already in use message is often caused by some (not properly catched) Ctrl+C or kill. Run it once with --force. If the message persists afterwards, we have to take a look again.

Merry Christmas,
Thomas

Nichols Romero

unread,
May 30, 2023, 1:01:47 AM5/30/23
to likwid-users
I searched the forum for a similar issue and this is possibly the closest one.

I am using the Marker API and running with MPI (there is no OpenMP). Here is the command line syntax that I am using:
# FLOP
likwid-mpirun -m -np 8 -g FLOPS_DP $bin $args
# bandwidth
likwid-mpirun -m -np 8 -g MEM $bin $args

I get a bunch of CSV file that contain event counts. There are also some nice tables that are printed to standard out (?). Is there a way to also get the table written to the CSV file?

I tried adding `-O` as suggested here:

but then oddly the table seem to disappear altogether (as it was not printed to standard out).







Thomas Gruber

unread,
May 30, 2023, 4:42:45 AM5/30/23
to likwid-users
likwid-mpirun does not have file output. It uses a different print function as likwid-perfctr to collect all node-specific CSV files. File output could be added but there is a project to rewrite the whole thing.
Reply all
Reply to author
Forward
0 new messages