Browse Source

Fix _starpu_datawizard_progress calls from the application context

Samuel Thibault 8 years ago
parent
commit
9a4011b6a0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/datawizard/datawizard.c

+ 5 - 1
src/datawizard/datawizard.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2009-2010, 2012-2016  Université de Bordeaux
+ * Copyright (C) 2009-2010, 2012-2017  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2013  CNRS
  * Copyright (C) 2010, 2011, 2013  CNRS
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -69,6 +69,10 @@ int __starpu_datawizard_progress(unsigned may_alloc, unsigned push_requests)
         int current_worker_id = starpu_worker_get_id();
         int current_worker_id = starpu_worker_get_id();
         unsigned memnode;
         unsigned memnode;
 
 
+	if (current_worker_id == -1)
+		/* Call from main application, only make RAM requests progress */
+		return ___starpu_datawizard_progress(STARPU_MAIN_RAM, may_alloc, push_requests);
+
         int ret = 0;
         int ret = 0;
 
 
         for (memnode = 0; memnode < STARPU_MAXNODES; memnode++)
         for (memnode = 0; memnode < STARPU_MAXNODES; memnode++)