Trouble generating gas particles with N-GenIC

From: Manuel Trashorras <manutras_at_hotmail.es>
Date: Fri, 18 May 2012 12:23:30 +0200

Hi everybody!

I've been trying as hard as I could to use N-GenIC to create initial =
conditions for a LCDM simulation (128^3 particles, box of 10Mpc), both =
with DM and gas. When deactivating -DPRODUCEGAS in makefile, everythig =
goes right and I get perfect dark matter-only initial conditions... =
However, when I activate -DPRODUCEGAS to produce gas particles in the =
initial conditions too (therefore having both, DM and barions), =
compilation fails:


Me:N-GenIC Hache$ make
mpicc -DPRODUCEGAS -DNO64BITID -03 -Wall =
-I/Users/Hache/Documents/Code/usr/fftw-2.1.5/include =
-I/Users/Hache/Documents/Code/usr/gsl-1.9/include -c -o main.o main.c
mpicc -DPRODUCEGAS -DNO64BITID -03 -Wall =
-I/Users/Hache/Documents/Code/usr/fftw-2.1.5/include =
-I/Users/Hache/Documents/Code/usr/gsl-1.9/include -c -o power.o =
power.c
power.c: In function =91read_power_table=92:
power.c:59: warning: format not a string literal and no format arguments
power.c:90: warning: format not a string literal and no format arguments
mpicc -DPRODUCEGAS -DNO64BITID -03 -Wall =
-I/Users/Hache/Documents/Code/usr/fftw-2.1.5/include =
-I/Users/Hache/Documents/Code/usr/gsl-1.9/include -c -o allvars.o =
allvars.c
mpicc -DPRODUCEGAS -DNO64BITID -03 -Wall =
-I/Users/Hache/Documents/Code/usr/fftw-2.1.5/include =
-I/Users/Hache/Documents/Code/usr/gsl-1.9/include -c -o save.o save.c
save.c: In function =91save_local_data=92:
save.c:218: error: =91WDM_On=92 undeclared (first use in this function) =
                  =20
save.c:218: error: (Each undeclared identifier is reported only once
save.c:218: error: for each function it appears in.)
save.c:218: error: =91WDM_Vtherm_On=92 undeclared (first use in this =
function)
make: *** [save.o] Error 1
Me:N-GenIC Hache$=20

In the 6 last lines to unknown variables "WDM_On" and "WDM_Vtherm_On" =
appear undeclared (Warm Dark matter, why?). They both appear in proto.h =
and save.c, along an other one "add_WDM_thermal_speeds". I've tried to =
track their origin and either comment them out with //, or declare them =
to be 0 or 1 with #define, with little success.

Anybody could be of any help??? There's quite frankly nothing else in my =
mind that I can try... I think I've exhausted all the possibilities a =
newbbie like me to cosmology and programming has. How do you get to =
create initial conditions with gas? (or stars, blackholes or any other =
non DM particlesot the 6 types in total availiable).

Thanks in advance! Here's some more help, the only places where "WDM" is =
present in all N-GenIC code:

>> In save.c:

#ifdef PRODUCEGAS
 for(i =3D 0, pc =3D 0; i < NumPart; i++)
   {
     for(k =3D 0; k < 3; k++)
        block[3 * pc + k] =3D P[i].Vel[k];

     if(WDM_On =3D=3D 1 && WDM_Vtherm_On =3D=3D 1)
        add_WDM_thermal_speeds(&block[3 * pc]);

     pc++;

     if(pc =3D=3D blockmaxlen)
        {
          my_fwrite(block, sizeof(float), 3 * pc, fd);
          pc =3D 0;
        }
   }
 if(pc > 0)
   my_fwrite(block, sizeof(float), 3 * pc, fd);
#endif

>> and in proto.h they appear in:

void add_WDM_thermal_speeds(float *vel)
Received on 2012-05-18 12:37:54

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