Browse Source

Do not warn when MALLOC_PERTURB_ is set to empty or zero

Samuel Thibault 10 years ago
parent
commit
dac20b3384
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/core/workers.c

+ 3 - 2
src/core/workers.c

@@ -1139,8 +1139,9 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 #ifdef STARPU_SIMGRID
 	/* Warn when the lots of stacks malloc()-ated by simgrid for transfer
 	 * processes will take a long time to get initialized */
-	if (starpu_getenv("MALLOC_PERTURB_"))
-		_STARPU_DISP("Warning: MALLOC_PERTURB_ is set, this makes simgrid runs very slow\n");
+	char *perturb = starpu_getenv("MALLOC_PERTURB_");
+	if (perturb && perturb[0] && atoi(perturb) != 0)
+		_STARPU_DISP("Warning: MALLOC_PERTURB_ is set to non-zero, this makes simgrid runs very slow\n");
 #else
 #ifdef __GNUC__
 #ifndef __OPTIMIZE__