Bläddra i källkod

mlr: fixing model_per_arch read when number of implementations is greater than STARPU_MAXIMPLEMENTATIONS

Luka Stanisic 8 år sedan
förälder
incheckning
550a9f30fc
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6 2
      src/core/perfmodel/perfmodel_history.c

+ 6 - 2
src/core/perfmodel/perfmodel_history.c

@@ -546,8 +546,12 @@ static void parse_arch(FILE *f, struct starpu_perfmodel *model, unsigned scan_hi
 	/* if the number of implementation is greater than STARPU_MAXIMPLEMENTATIONS
 	 * we skip the last implementation */
 	for (i = impl; i < nimpls; i++)
-		parse_per_arch_model_file(f, &dummy, 0, model->type);
-
+	{
+		if( model != NULL)
+			parse_per_arch_model_file(f, &dummy, 0, model->type);
+		else
+			parse_per_arch_model_file(f, &dummy, 0, 0);
+	}
 }
 
 static enum starpu_worker_archtype _get_enum_type(int type)