Hi, I just noticed that sreport gives negative Energy values. It looks like an int overflow (because I'm a big user :) # sreport cluster AccountUtilizationByUser Users=kilian start=2015-03-01 end=2015-03-31 -------------------------------------------------------------------------------- Cluster/Account/User Utilization 2015-03-01T00:00:00 - 2015-03-30T23:59:59 (2588400 secs) Time reported in CPU Minutes -------------------------------------------------------------------------------- Cluster Account Login Proper Name Used Energy --------- --------------- --------- --------------- ---------- ---------- sherlock ruthm kilian Kilian Cavalot+ 18115 -295873185 Thanks! Kilian
Killian, could you try this patch real quick and see if it fixes your issue? diff --git a/src/sreport/cluster_reports.c b/src/sreport/cluster_reports.c index 9b7f2bc..8c89f67 100644 --- a/src/sreport/cluster_reports.c +++ b/src/sreport/cluster_reports.c @@ -512,7 +512,7 @@ static int _setup_print_fields_list(List format_list) field->type = PRINT_CLUSTER_ENERGY; field->name = xstrdup("Energy"); field->len = 10; - field->print_routine = print_fields_int; + field->print_routine = print_fields_uint64; } else { exit_code=1; fprintf(stderr, " Unknown field '%s'\n", object);
(In reply to Danny Auble from comment #1) > Killian, could you try this patch real quick and see if it fixes your issue? Yup, that's it: # ./src/sreport/sreport cluster AccountUtilizationByUser Users=kilian start=2015-03-01 end=2015-03-31 -------------------------------------------------------------------------------- Cluster/Account/User Utilization 2015-03-01T00:00:00 - 2015-03-30T23:59:59 (2588400 secs) Time reported in CPU Minutes -------------------------------------------------------------------------------- Cluster Account Login Proper Name Used Energy --------- --------------- --------- --------------- ---------- ---------- sherlock ruthm kilian Kilian Cavalot+ 18115 3999094111 Thanks!
A more robust fix is in commit 1f2ada02bb6437. Thanks for testing so fast for me ;).
(In reply to Danny Auble from comment #3) > A more robust fix is in commit 1f2ada02bb6437. Thanks for testing so fast > for me ;). Thanks for fixing it so fast too! :)