Re: hang after deleting particles

From: Volker Springel <volker_at_MPA-Garching.MPG.DE>
Date: Mon, 18 Jun 2007 11:39:34 +0200

Jonathan Dursi wrote:
> Hi:
>
> Following the same path as many other groups, I'm trying to implement
> sink particles in Gadget (2.0.3). I can relabel particles to other
> types without incident, but when I try to delete particles I get a
> `busy hang' in gravtree that I'm as yet unable to track down.
>
> Following previous discussions on this list, I modify the local particle
> lists and counts (NumPart and N_gas) between every_timestep_stuff() and
> domain_Decomposition() in the main loop. If particles are changed, I
> force a rebuild of the tree by setting All.NumForcesSinceLastDomainDecomp
> to be something greater than All.TreeDomainUpdateFrequency*All.TotNumPart
> so that in the call to domain_Decomposition(), the appropriate steps
> are taken. I make sure that All.TotNumPart and All.TotN_gas are updated
> appropriately. The domain decomposition proceeds without incident, but
> then things hang in the calculation of forces in gravtree. Any suggestions
> as to what else I am missing?
>

Hi Jonathan,

I'm not fully sure what's going on, but based on what you describe, I
have a suspicion. It could be that the variable "NumForceUpdate" is
still too large when you enter the gravity calculation (i.e. it was not
reduced when an active particle was deleted). In this case you'll end up
in an infinite loop in the gravity calculation.

A way to check for this would be to put in a recalculation of
NumForceUpdate at the beginning of the function gravity_tree(), e.g.
like this:

  for(i = 0, NumForceUpdate = 0; i < NumPart; i++)
    {
      if(P[i].Ti_endstep == All.Ti_Current)
#ifdef SELECTIVE_NO_GRAVITY
        if(!((1 << P[i].Type) & (SELECTIVE_NO_GRAVITY)))
#endif
          NumForceUpdate++;
    }

Volker
Received on 2007-06-18 11:39:35

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