@@ -137,7 +137,10 @@ void _starpu_driver_end_job(struct _starpu_worker *worker, struct _starpu_job *j
if (rank == 0)
{
if ((profiling && profiling_info) || calibrate_model || starpu_top)
+ {
_starpu_clock_gettime(codelet_end);
+ _starpu_worker_register_executing_end(workerid);
+ }
#ifdef HAVE_AYUDAME_H
if (AYU_event) AYU_event(AYU_POSTRUNTASK, j->job_id, NULL);
#endif
@@ -268,6 +268,16 @@ void _starpu_worker_register_executing_start_date(int workerid, struct timespec
}
+void _starpu_worker_register_executing_end(int workerid)
+{
+ if (starpu_profiling_status_get())
+ STARPU_PTHREAD_MUTEX_LOCK(&worker_info_mutex[workerid]);
+ worker_registered_executing_start[workerid] = 0;
+ STARPU_PTHREAD_MUTEX_UNLOCK(&worker_info_mutex[workerid]);
+}
+
void _starpu_worker_update_profiling_info_executing(int workerid, struct timespec *executing_time, int executed_tasks, uint64_t used_cycles, uint64_t stall_cycles, double power_consumed, double flops)
@@ -47,6 +47,9 @@ void _starpu_worker_stop_sleeping(int workerid);
* end of the codelet. */
void _starpu_worker_register_executing_start_date(int workerid, struct timespec *executing_start);
+/* Record that the worker is not executing any more. */
+void _starpu_worker_register_executing_end(int workerid);
/* When StarPU is initialized, a matrix describing all the bus between memory
* nodes is created: it indicates whether there is a physical link between two
* memory nodes or not. This matrix should contain the identifier of the bus