Explorar el Código

perfmodel: update filenames to store performance model informations

	files are now called <hostname>.<type> instead of <type>.<hostname>. This makes it easier to browse
	through files (outside of StarPU) when multiple hosts share the same sampling directory.
Nathalie Furmento hace 13 años
padre
commit
38c8bb4a22
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/core/perfmodel/perfmodel_bus.c

+ 2 - 2
src/core/perfmodel/perfmodel_bus.c

@@ -582,7 +582,6 @@ static void benchmark_all_gpu_devices(void)
 static void get_bus_path(const char *type, char *path, size_t maxlen)
 {
 	_starpu_get_perf_model_dir_bus(path, maxlen);
-	strncat(path, type, maxlen);
 
 	char hostname[32];
 	char *forced_hostname = getenv("STARPU_HOSTNAME");
@@ -590,8 +589,9 @@ static void get_bus_path(const char *type, char *path, size_t maxlen)
 		snprintf(hostname, sizeof(hostname), "%s", forced_hostname);
 	else
 		gethostname(hostname, sizeof(hostname));
-	strncat(path, ".", maxlen);
 	strncat(path, hostname, maxlen);
+	strncat(path, ".", maxlen);
+	strncat(path, type, maxlen);
 }
 
 /*