Commit b4bb065c authored by Volker Springel's avatar Volker Springel
Browse files

added an update of the All-structure on the shared memory handler in begrun2()...

added an update of the All-structure on the shared memory handler in begrun2() also in cases comoving integration is not used
parent 3264a986
......@@ -318,6 +318,10 @@ void sim::begrun2(void)
All.FlushLast = Logs.CPUThisRun;
#endif
// update All on shared memory handler, just to allow it to access its elements if needed
if(Shmem.Island_NTask != Shmem.World_NTask && Shmem.Island_ThisTask == 0)
MPI_Send(All.get_data_ptr(), All.get_data_size(), MPI_BYTE, Shmem.MyShmRankInGlobal, TAG_ALL_UPDATE, MPI_COMM_WORLD);
#if defined(FORCETEST) && defined(FORCETEST_TESTFORCELAW)
gravity_forcetest_testforcelaw();
#endif
......
......@@ -97,6 +97,7 @@
#define TAG_NODE_DATA 84
#define TAG_RESULTS 85
#define TAG_DRIFT_INIT 86
#define TAG_ALL_UPDATE 87
#define TAG_METDATA 500
#define TAG_FETCH_GRAVTREE 1000
#define TAG_FETCH_SPH_DENSITY 2000
......
......@@ -200,6 +200,11 @@ void shmem::shared_memory_handler(void)
Mem.myfree(message);
Driftfac.init_drift_table();
}
else if(tag == TAG_ALL_UPDATE) // make the shared memory handler update the contents of the All structure
{
memcpy(All.get_data_ptr(), message, All.get_data_size());
Mem.myfree(message);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment