瀏覽代碼

starpu_perfmodel

Mariem makni 4 年之前
父節點
當前提交
81879e20a5
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      tests/perfmodels/test_papi.c

+ 9 - 2
tests/perfmodels/test_papi.c

@@ -70,12 +70,19 @@ static struct starpu_perfmodel my_perfmodel=
         .symbol = "my_perfmodel",
 };
 
+static struct starpu_perfmodel energy_model=
+{
+        .type = STARPU_HISTORY_BASED,
+        .symbol = "energy_model",
+};
+
+
 static struct starpu_codelet memset_cl=
 {
         .cpu_funcs = {memset0_cpu, memset_cpu},
         .cpu_funcs_name = {"memset0_cpu", "memset_cpu"},
         .model = &my_perfmodel,
-        .energy_model = &my_perfmodel,
+        .energy_model = &energy_model,
         .nbuffers = 1,
         .modes = {STARPU_W}
 };
@@ -162,7 +169,7 @@ int main(int argc, char **argv)
 
         /* Stop counting and store the values into the array */
 
-         if ( (retval = starpu_energy_stop(&my_perfmodel, task, ntasks)) != 0)
+         if ( (retval = starpu_energy_stop(&energy_model, task, ntasks)) != 0)
 
                 ERROR_RETURN(retval);