I ran the pi by integration benchmark with the ENERGY group specific but it seems like only one of the core is actually consuming energy. Following is the output I received.
Is this expected? Following is the code inside I have in my batch script.
icx -O3 -xHost -qopenmp -DLIKWID_PERFMON $LIKWID_INC parallelpi.c time.c $LIKWID_LIB -llikwid
srun --cpu-freq=2400000-2400000 likwid-perfctr -C S0:0-3 -g ENERGY -m ./a.out
Relevant snippet of the source code:
LIKWID_MARKER_INIT;
#pragma omp parallel
{
LIKWID_MARKER_REGISTER("pi");
}
wcTimeStart = getTimeStamp();
#pragma omp parallel
{
LIKWID_MARKER_START("pi");
#pragma omp for reduction(+:sum) private(x)
for (int i=0; i<slices; i++){
double x = (i+0.5)*delta_x;
sum = sum + 4*sqrt(1.0-x*x);
}
LIKWID_MARKER_STOP("pi");
}
wcTimeEnd = getTimeStamp();
LIKWID_MARKER_CLOSE;