Blame src/components/powercap/utils/README

Packit Service a1973e
powercap_write_test
Packit Service a1973e
Packit Service a1973e
This test demonstrates the ability of PAPI to use the Linux powercap interface to read and
Packit Service a1973e
write power constraints to gather energy information and apply power
Packit Service a1973e
constraints.
Packit Service a1973e
Packit Service a1973e
See the instructions in the components/powercap directory to build the component.
Packit Service a1973e
Packit Service a1973e
It works by using PAPI to read information from Linux powercap interface and write
Packit Service a1973e
it to a file.  The code repeatedly runs an OpenMP multithreaded
Packit Service a1973e
routine (primes) to stress the CPU.  The routine is called 100 times,
Packit Service a1973e
and at each call the power measurements are read using
Packit Service a1973e
PAPI_read(EventSet, values) and printed to a file.  At every 10th call
Packit Service a1973e
the power caps for the power packages are adjusted using
Packit Service a1973e
PAPI_write(EventSet, values ).
Packit Service a1973e
Packit Service a1973e
Build and run the test as follows
Packit Service a1973e
   cd components/powercap/utils/
Packit Service a1973e
   make clean
Packit Service a1973e
   make
Packit Service a1973e
   ./powercap_write_test
Packit Service a1973e
Packit Service a1973e
In the output file, you can see the power values that are SET and the
Packit Service a1973e
power values that are READ.  By comparing them you can confirm that
Packit Service a1973e
the component is performing as expected.