Explorar el Código

Do not warn when MALLOC_PERTURB_ is set to empty or zero

Samuel Thibault hace 10 años
padre
commit
dac20b3384
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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__