Browse Source

add id in fxt file name even if the variable STARPU_FXT_SUFFIX is defined

Nathalie Furmento 4 years ago
parent
commit
e6cea9386d
2 changed files with 5 additions and 3 deletions
  1. 4 2
      doc/doxygen/chapters/380_offline_performance_tools.doxy
  2. 1 1
      src/common/fxt.c

+ 4 - 2
doc/doxygen/chapters/380_offline_performance_tools.doxy

@@ -84,9 +84,11 @@ Or you can simply point the <c>PKG_CONFIG_PATH</c> to
 When FxT is enabled, a trace is generated when StarPU is terminated by calling
 starpu_shutdown(). The trace is a binary file whose name has the form
 <c>prof_file_XXX_YYY</c> where <c>XXX</c> is the user name, and
-<c>YYY</c> is the MPI id of the process that used StarPU. One can change
+<c>YYY</c> is the MPI id of the process that used StarPU (or 0 when running a sequential program).
+One can change
 the name of the file by setting the environnement variable \ref
-STARPU_FXT_SUFFIX. This file is saved in the
+STARPU_FXT_SUFFIX, its contents will be used instead of <c>prof_file_XXX</c>.
+This file is saved in the
 <c>/tmp/</c> directory by default, or by the directory specified by
 the environment variable \ref STARPU_FXT_PREFIX.
 

+ 1 - 1
src/common/fxt.c

@@ -119,7 +119,7 @@ static void _starpu_profile_set_tracefile(void)
 	}
 	else
 	{
-		snprintf(suffix, sizeof(suffix), "%s", fxt_suffix);
+		snprintf(suffix, sizeof(suffix), "%s_%d", fxt_suffix, _starpu_id);
 	}
 
 	snprintf(_starpu_prof_file_user, sizeof(_starpu_prof_file_user), "%s/%s", fxt_prefix, suffix);