Creating new particles

From: Luciano del Valle <ldelvall_at_das.uchile.cl>
Date: Fri, 10 Jun 2011 14:39:04 -0400

Hello Dear Gadget List!

I'm trying to implement the creation of particles.
Initially I have only particles of gas and then begin to create particles of
type 4. The problem is that after the simulation progresses a little (gadget
wrote a snapshot with new particles of Type 4 before stopping) Gadget2 seems
to stop running due to a problem of communication between processors. This
is the message that I receive from Gadget2:

"Begin Step 2, Time: 0.0183105, Systemstep: 0.00915527

 Creating new star...
 Creating new star...

domain decomposition...

 Creating new star ...
 Creating new star...
 Creating new star..

NTopleaves= 1233
work-load balance=3.73659 memory-balance=1.24574
exchange of 0000002221 particles
[linux-9bee:17979] *** Process received signal ***
[linux-9bee:17979] Signal: Floating point exception (8)
[linux-9bee:17979] Signal code: Integer divide-by-zero (1)
[linux-9bee:17979] Failing at address: 0xb71b1ddb
[linux-9bee:17979] [ 0] [0xffffe40c]
[linux-9bee:17979] [ 1] /lib/libgcc_s.so.1(__divdi3+0x9b) [0xb71b1ddb]
[linux-9bee:17979] [ 2] ./Gadget2(domain_exchangeParticles.+0xde)
[0x806398a]
[linux-9bee:17979] *** End of error message ***
[mrk04][0,1,6][btl_tcp_frag.c:202:mca_btl_tcp_frag_recv]
mca_btl_tcp_frag_recv:
readv failed with errno=104
mpirun noticed that job rank 0 with PID 17975 on node mrk04 exited on signal
15
(Terminated).
15 additional processes aborted (not shown)"

What I'm doing is that every step I see if a criterion is satisfied, then if
the criterion is met i do:

   NType [4] = nType [4] +1;
   header.npart [4] = header.npart [4] +1;
   NumPart + +;

and then define all quantities of the new star

     printf ("\ n Creating new star \ n ");

       P [+ header.npart N_gas [4] -1]. Type = 4;
       P [+ header.npart N_gas [4] -1]. Pos [0] = P [index]. Pos [0] +0.01 *
P [index]. Pos [0];
       P [+ header.npart N_gas [4] -1]. Pos [1] = P [index]. Pos [1] -0.01 *
P [index]. Pos [1];
       P [+ header.npart N_gas [4] -1]. Pos [2] = P [index]. Pos [2] +0.01 *
P [index]. Pos [2];
       P [+ header.npart N_gas [4] -1]. Vel [0] = P [index]. Vel [0] -0.01 *
P [index]. Vel [0];
       P [+ header.npart N_gas [4] -1]. Vel [1] = P [index]. Vel [1] +0.01 *
P [index]. Vel [1];
       P [+ header.npart N_gas [4] -1]. Vel [2] = P [index]. Vel [2] -0.01 *
P [index]. Vel [2];
       P [+ header.npart N_gas [4] -1]. Mass = (0.2/0.8) * P [index]. Mass;
       / / P [+ header.npart N_gas [4] -1]. header.npart ID = 1000000000 + [
4] + N_gas;

       for (j = 0, j <3; j + +)
          P [+ header.npart N_gas [4] -1]. GravAccel [j] = P [index].
GravAccel [j];
# ifdef PMGRID
       for (j = 0, j <3; j + +)
           P [+ header.npart N_gas [4] -1]. GravPM [j] = 0;
# endif
       P [+ header.npart N_gas [4] -1]. Ti_endstep = P [index]. Ti_endstep;
       P [+ header.npart N_gas [4] -1]. Ti_begstep = P [index]. Ti_begstep;

       P [+ header.npart N_gas [4] -1]. OldAcc = P [index]. OldAcc;
       P [+ header.npart N_gas [4] -1]. GravCost = 1;
       P [+ header.npart N_gas [4] -1]. Potential = 0;


       All.TotNumPart + +;


       All.NumForcesSinceLastDomainDecomp = 1 +
All.TreeDomainUpdateFrequency * All.TotNumPart;


Any help I thank in advance!


Cheers!
Luciano
Received on 2011-06-10 20:39:04

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST