The PAPI preset events used by your tool are set in the
src/papi_events.csv file as you've found.
That file is created by hand. If you need events that currently aren't
supported (for example, PAPI_L1_DCM "L1-Dcache Misses") you will need to
see if any of the native events on your processor can be combined to match
this event, and then patch the papi_events.csv file to support it.
You can find a list of native supported events with papi_native_avail, or
even better you can dig up the manual for your processor. On AMD systems
it's often called the "BIOS and Kernel Developer’s Guide (BKDG)" and is
specific to the model of processor you have. It shoud have a list of
events and an (unfortunately usually very short) descrption of what the
event measures.
Once you have picked some events you think will work, it's also best if
you can have a test that shows the events are measuring the right thing.
PAPI provides some of these in the validation tests directory, but you can
also make your own, or possibly use the Counter Analysis Toolkit.
As you can see this is a bit of a time consuming process and so while PAPI
often supports the more common predefined events for popular processors,
the less common ones are often contributed by people interested in the
hardware in question.
Vince Weaver
vincent...@maine.edu
On Wed, 2 Oct 2024, Engelbert Tijskens wrote:
> Dear Vince,
>
> We use Extrae with Papi to measure performance hardware counters.
> Papi_avail shows a very limited number of available counters on our AMD
> cluster on both the zen2 and zen3 partition. As a consequence we get
> errors from Extrae about unavailable counters. Perf_event_paranoid has
> been set to -1, but this does not help. I attached the output/error
> files and the job script for reference.
>
> Could you comment on this? Is this expected/normal? Is there a way to
> make the counters available? All hints are welcome.
>
> Hartelijke groeten,
> Bert
>
>
> From: Vince Weaver <
vincent...@maine.edu>
> Date: Tuesday, 1 October 2024 at 16:49
> To: Engelbert Tijskens <
Engelbert...@uantwerpen.be>
> Cc:
ptools-...@icl.utk.edu <
ptools-...@icl.utk.edu>
> Subject: Re: [ptools-perfapi] Which hardware counters are available on amd64 zen2 and zen3?
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> the papi_events.csv file describes the native events used to measure the
> PAPI preset events, so things like PAPI_TOT_CYC and PAPI_TOT_INS
>
> the actual full list of native evevents available on a machine is provided
> by the libpfm4 library, in src/libpfm4/
>
> Vince Weaver
>
vincent...@maine.edu
>
> On Tue, 1 Oct 2024, Engelbert Tijskens wrote:
>
> > While searching on the internet for cues I stumbled on the file src/papi_events.csv in the github repo of papi. Is my interpretation correct that the lines following
> > CPU,amd64_fam17h_zen2
> > and
> > CPU,amd64_fam19h_zen3
> > define the hardware counters that PAPI can read for amd64 zen2 and zen3 generation?
> >
> > Kindest regards,
> > Bert
> >
> > Engelbert Tijskens<mailto:
engelbert...@uantwerpen.be>
> > HPC Consultant/Analyst
> > Flemish Supercomputer Center -
vscentrum.be<
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.vscentrum.be%2Fabout&data=05%7C02%7CEngelbert.Tijskens%40uantwerpen.be%7C600ba47fafd543e8f0a308dce22837fe%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C638633909581575671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=vrfORGUPfUmGgzFzOk5CJ1Uw0NLxZO7RLSraxti25zM%3D&reserved=0<
https://www.vscentrum.be/about>>
> > University of Antwerp - Computational Mathematics<
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.uantwerpen.be%2Fen%2Fresearch-groups%2Fcma%2F&data=05%7C02%7CEngelbert.Tijskens%40uantwerpen.be%7C600ba47fafd543e8f0a308dce22837fe%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C638633909581597518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=R4%2BgTyfnqFYgrF1Ct1V7lNiTCE0gufjWd2n%2F7u4dGeI%3D&reserved=0<
https://www.uantwerpen.be/en/research-groups/cma/>>
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
ptools-perfap...@icl.utk.edu.
> > To view this discussion on the web visit
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fa%2Ficl.utk.edu%2Fd%2Fmsgid%2Fptools-perfapi%2FAM9PR05MB757040FAD53C4C304DE8C2559B772%2540AM9PR05MB7570.eurprd05.prod.outlook.com&data=05%7C02%7CEngelbert.Tijskens%40uantwerpen.be%7C600ba47fafd543e8f0a308dce22837fe%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C638633909581609606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=RpMsXZQkzVN1zgId3Tew2dK1SOZF9u6VBI8UlEqKLV0%3D&reserved=0<
https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/AM9PR05MB757040FAD53C4C304DE8C2559B772%40AM9PR05MB7570.eurprd05.prod.outlook.com>.
> >
>