Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fixed smpi_replay_init()
authorOlivier Richard <olivier.richard@imag.fr>
Thu, 4 Jun 2015 15:41:33 +0000 (17:41 +0200)
committerOlivier Richard <olivier.richard@imag.fr>
Sat, 13 Jun 2015 08:16:02 +0000 (10:16 +0200)
- Force context switch to be sure that MSG_processes begin
initialization and fill various variable (e.g. group->rank_to_index
_map)

src/smpi/smpi_replay.c

index 205208a..96cdbde 100644 (file)
@@ -1055,7 +1055,12 @@ void smpi_replay_init(int *argc, char***argv){
       THROWF(unknown_error, 0, "%s is not a double", (*argv)[2]);
     XBT_VERB("Delayed start for instance - Sleeping for %f flops ",value );
     smpi_execute_flops(value);
+  } else {
+    //UGLY done to force context switch to be sure that all MSG_process begin initialization
+    XBT_VERB("Force context switch by smpi_execute_flops  - Sleeping for 0.0 flops ");
+    smpi_execute_flops(0.0);
   }
+  
   xbt_replay_action_runner(*argc, *argv);
 }