Selaa lähdekoodia

perfmodel: it is not an error if the perfmodel directory does not exist when we try to list the available perfmodels, it just means none has been saved yet

Nathalie Furmento 12 vuotta sitten
vanhempi
commit
58751f7a82
2 muutettua tiedostoa jossa 2 lisäystä ja 9 poistoa
  1. 1 3
      src/core/perfmodel/perfmodel_history.c
  2. 1 6
      tools/starpu_perfmodel_display.c

+ 1 - 3
src/core/perfmodel/perfmodel_history.c

@@ -865,14 +865,12 @@ int starpu_perfmodel_list(FILE *output)
                                 fprintf(output, "file: <%s>\n", ep->d_name);
                 }
                 closedir (dp);
-                return 0;
         }
         else
 	{
 		_STARPU_DISP("Could not open the perfmodel directory <%s>\n", path);
-                perror("Error");
-                return 1;
         }
+	return 0;
 }
 
 /* This function is intended to be used by external tools that should read the

+ 1 - 6
tools/starpu_perfmodel_display.c

@@ -143,12 +143,7 @@ int main(int argc, char **argv)
 
         if (plist)
 	{
-                int ret = starpu_perfmodel_list(stdout);
-                if (ret)
-		{
-                        fprintf(stderr, "The performance model directory is invalid\n");
-                        return 1;
-                }
+                starpu_perfmodel_list(stdout);
         }
         else
 	{