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