From a9bdf573d6f2b434801936763e549db221952b1e Mon Sep 17 00:00:00 2001 From: Georges Da Costa <dacosta@irit.fr> Date: Sun, 28 Nov 2021 11:06:40 +0100 Subject: [PATCH] Updates RAPL call --- rapl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rapl.c b/rapl.c index 6c05e16..58600e7 100644 --- a/rapl.c +++ b/rapl.c @@ -70,7 +70,8 @@ unsigned int init_rapl(char* none, void **ptr) { rapl->packages = NULL; rapl->zones = NULL; - rapl->nb_pkgs = powercap_rapl_get_num_packages(); + rapl->nb_pkgs = powercap_rapl_get_num_instances(); + if (rapl->nb_pkgs == 0) { perror("no packages found (maybe the kernel module isn't loaded?)"); exit(-1); -- GitLab