Since my application is running in native mode, I am trying the micpower component.
Here is my config command.
./configure --prefix=$(PATH_TO_mic-native-build) --with-mic --with-components=micpower
After install succesfully and scp the install folder to mic0, i run command ./papi_native_avail in bin folder and get following.
===============================================================================
Native Events in Component: micpower
===============================================================================
| micpower:::tot0 |
| Total power, win 0 |
--------------------------------------------------------------------------------
| micpower:::tot1 |
| Total power, win 1 |
--------------------------------------------------------------------------------
| micpower:::pcie |
| PCI-E connector power |
--------------------------------------------------------------------------------
| micpower:::inst |
| Instantaneous power |
--------------------------------------------------------------------------------
| micpower:::imax |
| Max Instantaneous power |
--------------------------------------------------------------------------------
| micpower:::c2x3 |
| 2x3 connector power |
--------------------------------------------------------------------------------
| micpower:::c2x4 |
| 2x4 connector power |
--------------------------------------------------------------------------------
I change the micpower_basic example in papi-5.3.0/src/components/micpower/tests folder, I want to test the total energy consumption of the kernel.
Here is my code in attatchment with micpower_main.c.
icc -I$(PATH_to_mic-native-build)/include -mmic micpower_main.c -c
icc -mmic micpower_main.o -o main.x $(PATH_to_mic-native-build)/lib/libpapi.a
Here is the output of main.x
[root@hydra-mic0 ~]# ls
main.x mic-native-build micpower_basic mklCTest.x saves seidel.x temp
[root@hydra-mic0 ~]# ./main.x
n=500
CID NAME: 0 perf_event
CID NAME: 1 perf_event_uncore
CID NAME: 2 micpower
mic_cid=2
0.098000 0.097000 0.099000 0.177000 0.027000 0.029000 0.043000 0.021000 0.000000 0.000998 0.029000 0.000000 0.001000 0.035000 0.000000 0.001501
I can adjust the problem size throught N in micpower.c,
The thing is that the micpower:::tot0 and micpower:::tot1 nearly no change at all no matter I give N=500 or N=200 or N=1000 or just comment the kernel.
I can not understand the power number output by micpower here.
Do you have any explanation on these numbers?