Browse Source

Do not always write a starpu_idle_microsec.log file, only do so when STARPU_IDLE_FILE is set

Samuel Thibault 9 years ago
parent
commit
719cbe0d6f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/core/sched_policy.c

+ 3 - 3
src/core/sched_policy.c

@@ -1054,15 +1054,15 @@ int starpu_push_local_task(int workerid, struct starpu_task *task, int prio)
 
 void _starpu_print_idle_time()
 {
+	const char *sched_env = starpu_getenv("STARPU_IDLE_FILE");
+	if(!sched_env)
+		return;
 	double all_idle = 0.0;
 	int i = 0;
 	for(i = 0; i < STARPU_NMAXWORKERS; i++)
 		all_idle += idle[i];
 
 	FILE *f;
-	const char *sched_env = starpu_getenv("STARPU_IDLE_FILE");
-	if(!sched_env)
-		sched_env = "starpu_idle_microsec.log";
 	f = fopen(sched_env, "a");
 	if (!f)
 	{