Re: How is global data "All" synchronized across all processes?

From: Nathan Goldbaum <goldbaum_at_ucolick.org>
Date: Fri, 1 Apr 2011 15:51:20 -0700

Hi Mark,

Looking through the sink code I'm using, that does seem to be the case. If you're storing the total number of sinks in the All structure, you'll also have to broadcast NSinks whenever a sink is created.

Nathan Goldbaum
Graduate Student
Astronomy & Astrophysics, UCSC
goldbaum_at_ucolick.org
http://www.ucolick.org/~goldbaum

On Apr 1, 2011, at 2:33 PM, Mark Baumann wrote:

>
> Dear GADGET users,
>
> I have implemented sink particles across multiple processes in GADGET-2. In doing so, I am decrementing the variable All.TotNumPart as particles are deleted from the simulation.
>
> I am experiencing a problem in that different processes end up with different values of All.TotNumPart. Initial debugging seems to show that each process only registers the decrements that the process itself has made. This leads to my question: how is the struct "All" synchronized, if at all?
>
> By looking through the code I've found a few other places where All is modified, for instance All.Time is modified within run.c. However I do not see any blocking or communication code around these lines, leading me to wonder if changes to All.Time are registered on the other processes or not. Is there any place in the code that synchronizes the struct across all processes?
>
> If not, then I am guessing I will need to broadcast new values of All.TotNumPart whenever it is decremented by any process. Or, perhaps better, to do an Allreduce on particle number everytime a particle is deleted so that all processes will have an up-to-date value for All.TotNumPart. Before I do that, I wanted to ask you in case I am overlooking some synchronization code that already exists somewhere.
>
> Thank you for any insights,
>
> Mark
>
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
>
> !DSPAM:10175,4d9647a649511492130751!
>
Received on 2011-04-02 01:14:51

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET