Browse Source

disable asynchronous copy: distinguish what is an action and what is an enquiry

Nathalie Furmento 13 years ago
parent
commit
af8467cd5a
4 changed files with 11 additions and 11 deletions
  1. 2 2
      doc/chapters/basic-api.texi
  2. 1 1
      include/starpu.h
  3. 7 7
      src/core/workers.c
  4. 1 1
      src/core/workers.h

+ 2 - 2
doc/chapters/basic-api.texi

@@ -115,10 +115,10 @@ not support concurrent calls to parallel code. In such case, setting this flag
 makes StarPU only start one parallel task at a time.
 makes StarPU only start one parallel task at a time.
 This can also be specified with the @code{STARPU_SINGLE_COMBINED_WORKER} environment variable.
 This can also be specified with the @code{STARPU_SINGLE_COMBINED_WORKER} environment variable.
 
 
-@item @code{int asynchronous_copy_disabled} (default = 0)
+@item @code{int disable_asynchronous_copy} (default = 0)
 This flag should be set to 1 to disable asynchronous copies between
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and accelerators. This can also be specified with the
 CPUs and accelerators. This can also be specified with the
-@code{STARPU_ASYNCHRONOUS_COPY_DISABLED} environment variable.
+@code{DISABLE_STARPU_ASYNCHRONOUS_COPY} environment variable.
 The AMD implementation of OpenCL is known to
 The AMD implementation of OpenCL is known to
 fail when copying data asynchronously. When using this implementation,
 fail when copying data asynchronously. When using this implementation,
 it is therefore necessary to disable asynchronous data transfers.
 it is therefore necessary to disable asynchronous data transfers.

+ 1 - 1
include/starpu.h

@@ -82,7 +82,7 @@ struct starpu_conf
 	int single_combined_worker;
 	int single_combined_worker;
 
 
         /* indicate if the asynchronous copies should be disabled */
         /* indicate if the asynchronous copies should be disabled */
-	int asynchronous_copy_disabled;
+	int disable_asynchronous_copy;
 };
 };
 
 
 /* Initialize a starpu_conf structure with default values. */
 /* Initialize a starpu_conf structure with default values. */

+ 7 - 7
src/core/workers.c

@@ -368,7 +368,7 @@ int starpu_conf_init(struct starpu_conf *conf)
 
 
 	conf->single_combined_worker = starpu_get_env_number("STARPU_SINGLE_COMBINED_WORKER");
 	conf->single_combined_worker = starpu_get_env_number("STARPU_SINGLE_COMBINED_WORKER");
 
 
-	conf->asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
+	conf->disable_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
 
 
 	return 0;
 	return 0;
 }
 }
@@ -448,16 +448,16 @@ int starpu_init(struct starpu_conf *user_conf)
 
 
 	if (user_conf)
 	if (user_conf)
 	{
 	{
-	     int asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
+	     int asynchronous_copy_disabled = starpu_get_env_number("DISABLE_STARPU_ASYNCHRONOUS_COPY");
 	     if (asynchronous_copy_disabled == 1)
 	     if (asynchronous_copy_disabled == 1)
-		  config.asynchronous_copy_disabled = 1;
+		  config.disable_asynchronous_copy = 1;
 	     else
 	     else
-		  config.asynchronous_copy_disabled = (user_conf->asynchronous_copy_disabled == 1);
+		  config.disable_asynchronous_copy = (user_conf->disable_asynchronous_copy == 1);
 	}
 	}
 	else
 	else
 	{
 	{
-	     int asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
+	     int asynchronous_copy_disabled = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
-	     config.asynchronous_copy_disabled = (asynchronous_copy_disabled == 1);
+	     config.disable_asynchronous_copy = (asynchronous_copy_disabled == 1);
 	}
 	}
 
 
 	ret = _starpu_build_topology(&config);
 	ret = _starpu_build_topology(&config);
@@ -707,7 +707,7 @@ unsigned starpu_spu_worker_get_count(void)
 
 
 int starpu_asynchronous_copy_disabled()
 int starpu_asynchronous_copy_disabled()
 {
 {
-	return config.asynchronous_copy_disabled;
+	return config.disable_asynchronous_copy;
 }
 }
 
 
 /* When analyzing performance, it is useful to see what is the processing unit
 /* When analyzing performance, it is useful to see what is the processing unit

+ 1 - 1
src/core/workers.h

@@ -159,7 +159,7 @@ struct _starpu_machine_config
 	unsigned running;
 	unsigned running;
 
 
         /* indicate if the asynchronous copies should be disabled */
         /* indicate if the asynchronous copies should be disabled */
-        int asynchronous_copy_disabled;
+        int disable_asynchronous_copy;
 };
 };
 
 
 /* Has starpu_shutdown already been called ? */
 /* Has starpu_shutdown already been called ? */