Arthur Brandao 6 лет назад
Родитель
Сommit
354bee27d5
4 измененных файлов с 9 добавлено и 11 удалено
  1. 3 5
      Hybride/GSATThreadMPI.cpp
  2. 2 2
      MPI/Main.cpp
  3. 2 2
      Part_2/GSATThread.cpp
  4. 2 2
      Thread/GSATThread.cpp

+ 3 - 5
Hybride/GSATThreadMPI.cpp

@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include "Main.hpp"
 #include "GSATThreadMPI.hpp"
-#include  "color.h"
+#include "color.h"
 
 extern int world_rank;
 
@@ -49,7 +49,7 @@ bool GSATThreadMPI::solve() {
 		printf("s %s\n",find?"SATISFIABLE":"NOT FOUND");
 		printf(YELLOW);
         printf("c real time : %.4f seconds\n", result.calcTime);
-        printf("c [processor:%d][thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+        printf("c [processor:%d][thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 			world_rank,
 			result.threadId,
 			result.nbIteration,
@@ -82,7 +82,7 @@ void GSATThreadMPI::solverThread(int id) {
         if(solve) {
         	printf(CYAN);
         }
-		printf("c [processor:%d][thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+		printf("c [processor:%d][thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 			world_rank,
 			id,
 		   	gsat[id]->getNbIterations(),
@@ -96,10 +96,8 @@ void GSATThreadMPI::solverThread(int id) {
 		cpt++;
 		if(id == 0) {
 			mpiSync(this, end || solve);
-			//printf("bool : %d %d\n", end, solve);
 		}
 	}
-	//printf("%d %d %d\n", world_rank, end, solve);
 	//Si 1er arreter
 	if(!end && solve) {
 		end = true;

+ 2 - 2
MPI/Main.cpp

@@ -48,7 +48,7 @@ int main(int argc, char* argv[]) {
         if(end) {
             printf(CYAN);
         }
-        printf("c [processor:%d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+        printf("c [processor:%d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
             world_rank,
             gsat->getNbIterations(),
             gsat->getHeuristicFill(),
@@ -77,7 +77,7 @@ int main(int argc, char* argv[]) {
         printf("s %s\n",end?"SATISFIABLE":"NOT FOUND");
         printf(YELLOW);
         printf("c real time : %.4f seconds\n", gsat->realTime() - startTime);
-        printf("c [processor:%d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+        printf("c [processor:%d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
             world_rank,
             gsat->getNbIterations(),
             gsat->getHeuristicFill(),

+ 2 - 2
Part_2/GSATThread.cpp

@@ -71,7 +71,7 @@ void GSATThread::printResult() {
 	}
 	printf(YELLOW);
 	if(end) {
-		printf("c [thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+		printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 			result.threadId,
 			result.nbIteration,
 			result.heuristicFill,
@@ -95,7 +95,7 @@ void GSATThread::solverThread(int id, bool verbose) {
 			if(solve) {
 				printf(CYAN);
 			}
-			printf("c [thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+			printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 				id,
 		   		gsat[id]->getNbIterations(),
 		   		gsat[id]->getHeuristicFill(),

+ 2 - 2
Thread/GSATThread.cpp

@@ -72,7 +72,7 @@ void GSATThread::printResult() {
 	}
 	printf(YELLOW);
 	if(end) {
-		printf("c [thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+		printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 			result.threadId,
 			result.nbIteration,
 			result.heuristicFill,
@@ -96,7 +96,7 @@ void GSATThread::solverThread(int id, bool verbose) {
 			if(solve) {
 				printf(CYAN);
 			}
-			printf("c [thread:%2d][iteration:%5d][file:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+			printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 				id,
 		   		gsat[id]->getNbIterations(),
 		   		gsat[id]->getHeuristicFill(),