The lines fprintf(stderr, "rapl_type_id()=%"PRIx64", rapl_gpu_power()=%"PRIx64"\n", rapl_type_id(), rapl_gpu_power()); made the overlay fail to build. I have changed that to (using lx is not perfect, but PRIx64 made it fail to build): fprintf(stderr, "rapl_type_id()=%lx\n",rapl_type_id()); fprintf(stderr, "rapl_gpu_power()=%lx\n",rapl_gpu_power()); which should result in the intended output. It was: rapl_type_id()=d rapl_gpu_power()=4 rapl_gpu_power_scale()=2,000000