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