Re: Star formation

From: Volker Springel <volker_at_MPA-Garching.MPG.DE>
Date: Mon, 14 Nov 2005 16:32:16 +0100

Fabrice DURIER wrote:
> Dear all,
> Presently, I'm trying to introduce a mechanism to form stars on
> Gadget1 (unfortunately Gadget2 does not work yet on our Alpha machine:
> it compiles with mpich1.2.6 but crashes after a few steps without any
> particular error message, just *p0_882848: p4_error: interrupt SIGFPE:
> 8*...)

Unlike most other machines I know, Alpha's are often set-up such that
they terminate a process if a floating point exception (e.g. division by
zero) happens. This is apparently what happened for you when using
gadget2. I suspect this could have happened simply in one of the log
messages, e.g. when the force speed is computed, i.e. in an uncritical

To find out exactly where it happened, I'd suggest to compile the code
with "-g" and to let it produce a core-dump when the SIGFPE happens.
Loading the core-file into a symbolic debugger will then tell the line
where it happened, which will probably be easy to fix.

Unfortunately, MPICH has the habit to disable core-files, which happens
somewhere in MPI_Init.

So to reenable them, you may have to insert something like

  getrlimit(RLIMIT_CORE, &rlim);
  rlim.rlim_cur = RLIM_INFINITY;
  setrlimit(RLIMIT_CORE, &rlim);
  signal(SIGFPE, SIG_DFL)

after the call of MPI_Init into main.c. You will also need a few more
header files for that in this file.

#include <sys/resource.h>
#include <unistd.h>
#include <signal.h>

Once this problem is solved, I would suggest to switch to gadget2. In
the latter, it's also (somewhat) easier to implement star formation.


> Anyway, I have already put a cooling function (Katz, Weinberg &
> Hernquist, 96) in the energy equation for gas particles. I select
> particles which satisfy specific conditions (in the usual way: Jeans
> instability, density threshold...). I then switch these particles from
> type 0 to type 4.
> As I have seen previous messages here on this subject, I wanted to
> follow Volker's advice: to insert a "rearrange_particle" routine just
> before the domain decomposition, but the code crashes immediately after.
> Without this routine, the code continue with the following warning
> sometimes appearing after the "birth" of a star:
> *Warning. No convergence in `findSplitPoint' achieved.
> Balance: 0.469157 Iterations: 128 Task: 0
> flagmemoryimbalance=0
> xmaxleftofguess=14535.1 xminrightofguess=14856.6 xleft=14856.6
> xright=14856.6
> * I found the function /findSplitPoint() /in the file domain.c, but
> does anyone know what it means?
> My main problem however concern the feedback model. During the star
> formation process, I need to "temporarily" remove some of the particles
> (they must reappear later) of the simulation. I know Eugene Kurbatov
> tried to introduce a negative type, but this seems too complicated to me
> (I don't know how to modify the tree structure...). As a result, I put
> Mass=0 for these gas particles (in the hope of later regaining mass),
> but I'm not sure if the simulation treats them as "invisible". For the
> moment I can't work out how to make them reappear!
> Does anyone know how to do this? Any advice or idea would be appreciated!
> Cheers,
> Fabrice_
> --
> -------------------------------
> Fabrice Durier
> Observatoire de la Côte d'Azur
> Département CASSIOPEE
> B.P. 4229
> 06304 NICE Cedex 04
> T: (+33)
> M:
> E-mail: <>
> -------------------------------
> ------------------------------------------------------------------------
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
Received on 2005-11-14 16:32:16

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