|  | @@ -45,24 +45,10 @@ bool GSATThreadMPI::solve() {
 | 
	
		
			
				|  |  |  	mpiSync.join();
 | 
	
		
			
				|  |  |  	//Si c'est le proc qui à trouvé
 | 
	
		
			
				|  |  |  	if(find) {
 | 
	
		
			
				|  |  | -		sleep(1); //Laisse le temps aux autres de se couper
 | 
	
		
			
				|  |  |  		//Affiche resultat
 | 
	
		
			
				|  |  | +		sleep(1); //Attend la fin des autres processus
 | 
	
		
			
				|  |  |  		printf("-----------------------------------------------------------------------------------------------------------------\n");
 | 
	
		
			
				|  |  | -		printf(GREEN);
 | 
	
		
			
				|  |  | -		printf("s %s\n",find?"SATISFIABLE":"NOT FOUND");
 | 
	
		
			
				|  |  | -		printf(YELLOW);
 | 
	
		
			
				|  |  | -        printf("c real time : %.4f seconds\n", result.calcTime);
 | 
	
		
			
				|  |  | -        printf("c [pid:%6d][process:%2d][thread:%2d][iteration:%4d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 | 
	
		
			
				|  |  | -			getpid(),
 | 
	
		
			
				|  |  | -			world_rank,
 | 
	
		
			
				|  |  | -			result.threadId,
 | 
	
		
			
				|  |  | -			result.nbIteration,
 | 
	
		
			
				|  |  | -			result.heuristicFill,
 | 
	
		
			
				|  |  | -			result.heuristicSolve,
 | 
	
		
			
				|  |  | -			result.nbSatisfiedClausesFill,
 | 
	
		
			
				|  |  | -			result.nbSatisfiedClausesSolve);
 | 
	
		
			
				|  |  | -        printf(RESET);
 | 
	
		
			
				|  |  | -        fflush(stdout);
 | 
	
		
			
				|  |  | +		this->printResult();
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |    	return find;
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -71,6 +57,24 @@ void GSATThreadMPI::isEnd() {
 | 
	
		
			
				|  |  |  	end = true;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +void GSATThreadMPI::printResult() {
 | 
	
		
			
				|  |  | +	printf(GREEN);
 | 
	
		
			
				|  |  | +	printf("s %s\n",find?"SATISFIABLE":"NOT FOUND");
 | 
	
		
			
				|  |  | +	printf(YELLOW);
 | 
	
		
			
				|  |  | +    printf("c real time : %.4f seconds\n", result.calcTime);
 | 
	
		
			
				|  |  | +    printf("c [pid:%6d][process:%2d][thread:%2d][iteration:%4d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
 | 
	
		
			
				|  |  | +		getpid(),
 | 
	
		
			
				|  |  | +		world_rank,
 | 
	
		
			
				|  |  | +		result.threadId,
 | 
	
		
			
				|  |  | +		result.nbIteration,
 | 
	
		
			
				|  |  | +		result.heuristicFill,
 | 
	
		
			
				|  |  | +		result.heuristicSolve,
 | 
	
		
			
				|  |  | +		result.nbSatisfiedClausesFill,
 | 
	
		
			
				|  |  | +		result.nbSatisfiedClausesSolve);
 | 
	
		
			
				|  |  | +    printf(RESET);
 | 
	
		
			
				|  |  | +    fflush(stdout);
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /* --- Private --- */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  void GSATThreadMPI::solverThread(int id) {
 |