浏览代码

energy: Fix reporting CPU energy

Samuel Thibault 4 年之前
父节点
当前提交
ae65380242
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/core/perfmodel/energy_model.c

+ 1 - 3
src/core/perfmodel/energy_model.c

@@ -198,8 +198,6 @@ int starpu_energy_stop(struct starpu_perfmodel *model, struct starpu_task *task,
 		}
 		free(values);
 
-		energy = energy * 0.23 / 1.0e9 / ntasks;
-
 		/*removes all events from a PAPI event set */
 		if ( (retval = PAPI_cleanup_eventset(EventSet)) != PAPI_OK)
 			ERROR_RETURN(retval);
@@ -242,7 +240,7 @@ int starpu_energy_stop(struct starpu_perfmodel *model, struct starpu_task *task,
 
 	arch = starpu_worker_get_perf_archtype(workerid, STARPU_NMAX_SCHED_CTXS);
 
-	starpu_perfmodel_update_history(model, task, arch, cpuid, nimpl, energy);
+	starpu_perfmodel_update_history_n(model, task, arch, cpuid, nimpl, energy / ntasks, ntasks);
 
 	return retval;
 }