Browse Source

Avoid deadlock with openmp and simgrid

Samuel Thibault 7 years ago
parent
commit
1218066a12
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/drivers/cpu/driver_cpu.c

+ 5 - 0
src/drivers/cpu/driver_cpu.c

@@ -344,10 +344,15 @@ int _starpu_cpu_driver_run_once(struct _starpu_worker *cpu_worker)
 		task = _starpu_get_worker_task(cpu_worker, workerid, memnode);
 
 #ifdef STARPU_SIMGRID
+#ifdef STARPU_OPENMP
+	/* FIXME: properly test termination for caller */
+	MSG_process_sleep(0.001);
+#else
 	if (!res && !task)
 		/* No progress, wait */
 		starpu_pthread_wait_wait(&cpu_worker->wait);
 #endif
+#endif
 
 	if (!task)
 		/* No task or task still pending transfers */