소스 검색

Tentative correction bug crash inconnue

Loquicom 6 년 전
부모
커밋
8f00dc7ab4
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      Partie_1/Hybride/GSATHybride.hpp
  2. 1 1
      Partie_1/Hybride/Main.cpp

+ 1 - 1
Partie_1/Hybride/GSATHybride.hpp

@@ -52,7 +52,7 @@ class GSATThreadMPI {
 		std::vector<std::thread> threads;
 		std::vector<std::thread> threads;
 		std::thread mpiSync;
 		std::thread mpiSync;
 		GSATResult result;
 		GSATResult result;
-
+		
 		void solverThread(int);
 		void solverThread(int);
 		void mpiWait(GSATThreadMPI*);
 		void mpiWait(GSATThreadMPI*);
 		void mpiNotify(int);
 		void mpiNotify(int);

+ 1 - 1
Partie_1/Hybride/Main.cpp

@@ -67,6 +67,7 @@ int main(int argc, char* argv[]) {
 
 
     //Le processus d'affichage attend de recevoir les resultats à afficher
     //Le processus d'affichage attend de recevoir les resultats à afficher
     if(world_rank == DISPLAY_RANK) {
     if(world_rank == DISPLAY_RANK) {
+        sleep(1); //Attend la fin des autres processus
         //Recup les infos
         //Recup les infos
         int pid, rank, thread;
         int pid, rank, thread;
         double time;
         double time;
@@ -83,7 +84,6 @@ int main(int argc, char* argv[]) {
         //Set le resultat
         //Set le resultat
         gsat->setResult(true, pid, rank, thread, time, nbIte, heuriFill, heuriSolve, satisfFill, satisfSolve);
         gsat->setResult(true, pid, rank, thread, time, nbIte, heuriFill, heuriSolve, satisfFill, satisfSolve);
         //Affiche resultat
         //Affiche resultat
-        sleep(1); //Attend la fin des autres processus
         printf("-----------------------------------------------------------------------------------------------------------------\n");
         printf("-----------------------------------------------------------------------------------------------------------------\n");
         gsat->printResult();
         gsat->printResult();
     }
     }