@@ -1210,7 +1210,7 @@ double nvmon_getMetric(int groupId, int metricId, int gpuId)
12101210 e = calc_metric (ginfo -> metricformulas [metricId ], & clist , & result );
12111211 e = calc_metric_new (ginfo -> metrictrees [metricId ], & clist , & result2 );
12121212 if (fabs (result - result2 ) > 1.0E-6 ) {
1213- fprintf (stderr "Error: results don't match" );
1213+ fprintf (stderr , "Error: results don't match" );
12141214 exit (EXIT_FAILURE );
12151215 }
12161216
@@ -1278,7 +1278,7 @@ double nvmon_getLastMetric(int groupId, int metricId, int gpuId)
12781278 e = calc_metric (ginfo -> metricformulas [metricId ], & clist , & result );
12791279 e = calc_metric_new (ginfo -> metrictrees [metricId ], & clist , & result2 );
12801280 if (fabs (result - result2 ) > 1.0E-6 ) {
1281- fprintf (stderr "Error: results don't match" );
1281+ fprintf (stderr , "Error: results don't match" );
12821282 exit (EXIT_FAILURE );
12831283 }
12841284
@@ -1711,10 +1711,11 @@ double nvmon_getMetricOfRegionGpu(int region, int metricId, int gpuId)
17111711 add_to_clist (& clist , "false" , 0 );
17121712
17131713 double result2 ;
1714- e = calc_metric (ginfo -> metricformulas [metricId ], & clist , & result );
1714+ char * f = ginfo -> metricformulas [metricId ];
1715+ e = calc_metric (f , & clist , & result );
17151716 e = calc_metric_new (ginfo -> metrictrees [metricId ], & clist , & result2 );
17161717 if (fabs (result - result2 ) > 1.0E-6 ) {
1717- fprintf (stderr "Error: results don't match" );
1718+ fprintf (stderr , "Error: results don't match" );
17181719 exit (EXIT_FAILURE );
17191720 }
17201721
0 commit comments