소스 검색

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 13 년 전
부모
커밋
58751f7a82
2개의 변경된 파일2개의 추가작업 그리고 9개의 파일을 삭제
  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
 	{