Просмотр исходного кода

src/core/workers.c: deal with cases when starpu_conf_init has not been called

Nathalie Furmento лет назад: 14
Родитель
Сommit
1a0f7072e5
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      src/core/workers.c

+ 5 - 1
src/core/workers.c

@@ -448,7 +448,11 @@ int starpu_init(struct starpu_conf *user_conf)
 
 	if (user_conf)
 	{
-	     config.disable_asynchronous_copy = (user_conf->disable_asynchronous_copy == 1);
+	     int disable_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
+	     if (disable_asynchronous_copy == 1)
+		  config.disable_asynchronous_copy = 1;
+	     else
+		  config.disable_asynchronous_copy = (user_conf->disable_asynchronous_copy == 1);
 	}
 	else
 	{