Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] Restore privatisation mapping smpi_execute()
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 11 Sep 2014 10:10:56 +0000 (12:10 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 11 Sep 2014 10:44:22 +0000 (12:44 +0200)
smpi_execute() calls a the host_execution simcall which might generate
a process switch. After this, we might not have the correct SMPI
privatisation region: we have to rectore it. The correct privatisation
mapping is needed by some code between smpi_bench_end() and
smpi_bench_begin().

src/smpi/smpi_bench.c

index 393c850..7207e64 100644 (file)
@@ -160,6 +160,7 @@ void smpi_execute_flops(double flops) {
   simcall_set_category (action, TRACE_internal_smpi_get_category());
 #endif
   simcall_host_execution_wait(action);
+  smpi_switch_data_segment(smpi_process_index());
 }
 
 void smpi_execute(double duration)