소스 검색

Fix papi memleak with parallel tasks

Samuel Thibault 4 년 전
부모
커밋
ab2095045a
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/drivers/cpu/driver_cpu.c

+ 4 - 2
src/drivers/cpu/driver_cpu.c

@@ -114,11 +114,13 @@ static int execute_job_on_cpu(struct _starpu_job *j, struct starpu_task *worker_
 			}
 #else
 #  ifdef STARPU_PAPI
-			_starpu_profiling_papi_task_start_counters(task);
+			if (rank == 0)
+				_starpu_profiling_papi_task_start_counters(task);
 #  endif
 			func(_STARPU_TASK_GET_INTERFACES(task), task->cl_arg);
 #  ifdef STARPU_PAPI
-			_starpu_profiling_papi_task_stop_counters(task);
+			if (rank == 0)
+				_starpu_profiling_papi_task_stop_counters(task);
 #  endif
 #endif
 			_STARPU_TRACE_END_EXECUTING();