Re: Setting PRODUCEGAS in N-GenIC Makefile returns error

From: Hassan Fathivavsari <h.fathie_at_gmail.com>
Date: Mon, 5 Jul 2021 05:37:27 -0700

Dear Volker,

Thank you very much for your reply.

I have followed your instructions and included GENERATE_GAS_IN_ICS in the
Config.sh file present in the /examples/DM-L50-N128/ folder. I also modified
NTYPES=2 to NTYPES=5. I then recompiled the code and generated a new
Gadget4 executable.

I then included the following lines in the param.txt file in order to be
compatible
with NTYPES=5:

SofteningClassOfPartType2 0
SofteningClassOfPartType3 0
SofteningClassOfPartType4 0

But when I issue the following command:

mpirun -np 6 ./Gadget4 param.txt

the code stops running with following error report:

I've found something odd!
The mass content accounts only for Omega=0.616,
but you specified Omega=0.308 in the parameterfile.

I have also included below the whole terminal output when I run Gadget4:

============== The whole Terminal output =======
Shared memory islands host a minimum of 6 and a maximum of 6 MPI ranks.

  ___ __ ____ ___ ____ ____ __
 / __) /__\ ( _ \ / __)( ___)(_ _)___ /. |
( (_-. /(__)\ )(_) )( (_-. )__) )( (___)(_ _)
 \___/(__)(__)(____/ \___/(____) (__) (_)

This is Gadget, version 4.0.
Git commit unknown, unknown

Code was compiled with the following compiler and flags:
mpicxx -std=c++11 -O3 -Wall -I/hdf5/build/include -I/usr/local/include
-I/usr/local/include -I./examples/DM-L50-N128/Including_Gas//build -Isrc


Code was compiled with the following settings:
    ASMTH=2.0
    CREATE_GRID
    DOUBLEPRECISION=2
    FOF
    GENERATE_GAS_IN_ICS
    IDS_32BIT
    LEAN
    NGENIC=256
    NGENIC_2LPT
    NSOFTCLASSES=1
    NTYPES=5
    PERIODIC
    PMGRID=384
    POSITIONS_IN_32BIT
    POWERSPEC_ON_OUTPUT
    RANDOMIZE_DOMAINCENTER
    SELFGRAVITY
    TREEPM_NOTIMESPLIT


Running on 6 MPI tasks.


BEGRUN: Size of particle structure 56 [bytes]
BEGRUN: Size of sph particle structure 96 [bytes]
BEGRUN: Size of gravity tree node 72 [bytes]
BEGRUN: Size of neighbour tree node 112 [bytes]
BEGRUN: Size of subfind auxiliary data 36 [bytes]


-------------------------------------------------------------------------------------------------------------------------
AvailMem: Largest = 65.37 Mb (on task= 0), Smallest = 65.37 Mb
(on task= 0), Average = 65.37 Mb
Total Mem: Largest = 4987.92 Mb (on task= 0), Smallest = 4987.92 Mb
(on task= 0), Average = 4987.92 Mb
Committed_AS: Largest = 4922.55 Mb (on task= 0), Smallest = 4922.55
Mb (on task= 0), Average = 4922.55 Mb
SwapTotal: Largest = 2048.00 Mb (on task= 0), Smallest = 2048.00 Mb
(on task= 0), Average = 2048.00 Mb
SwapFree: Largest = 2046.48 Mb (on task= 0), Smallest = 2046.48 Mb
(on task= 0), Average = 2046.48 Mb
AllocMem: Largest = 4922.55 Mb (on task= 0), Smallest = 4922.55 Mb
(on task= 0), Average = 4922.55 Mb
avail /dev/shm: Largest = 4736.90 Mb (on task= 0), Smallest =
 4736.90 Mb (on task= 0), Average = 4736.90 Mb
-------------------------------------------------------------------------------------------------------------------------
Task=0 has the maximum commited memory and is host: ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Obtaining parameters from file 'param.txt':

        InitCondFile ./dummy.dat
        OutputDir ./output
        SnapshotFileBase snapshot
        OutputListFilename output_times.txt
        ICFormat 1
        SnapFormat 3
        TimeLimitCPU 86400
        CpuTimeBetRestartFile 72000
        MaxMemSize 300
        TimeBegin 0.04
        TimeMax 1
        ComovingIntegrationOn 1
        Omega0 0.308
        OmegaLambda 0.692
        OmegaBaryon 0.0482
        HubbleParam 0.678
        Hubble 100
        BoxSize 50
        OutputListOn 1
        TimeBetSnapshot 0.02
        TimeOfFirstSnapshot 0.02
        TimeBetStatistics 0.02
        NumFilesPerSnapshot 1
        MaxFilesWithConcurrentIO 1
        ErrTolIntAccuracy 0.01
        CourantFac 0.3
        MaxSizeTimestep 0.005
        MinSizeTimestep 0
        TypeOfOpeningCriterion 1
        ErrTolTheta 0.75
        ErrTolThetaMax 1
        ErrTolForceAcc 0.002
        TopNodeFactor 3
        ActivePartFracForNewDomainDecomp 0.01
        ActivePartFracForPMinsteadOfEwald 0.05
        DesNumNgb 64
        MaxNumNgbDeviation 1
        UnitLength_in_cm 3.08568e+24
        UnitMass_in_g 1.989e+43
        UnitVelocity_in_cm_per_s 100000
        GravityConstantInternal 0
        SofteningComovingClass0 0.01
        SofteningMaxPhysClass0 0.01
        SofteningClassOfPartType0 0
        SofteningClassOfPartType1 0
        SofteningClassOfPartType2 0
        SofteningClassOfPartType3 0
        SofteningClassOfPartType4 0
        ArtBulkViscConst 1
        MinEgySpec 0
        InitGasTemp 0
        NSample 128
        GridSize 128
        Seed 181170
        SphereMode 1
        PowerSpectrumType 0
        ReNormalizeInputSpectrum 1
        PrimordialIndex 1
        ShapeGamma 0.21
        Sigma8 0.9
        PowerSpectrumFile powerspec
        InputSpectrum_UnitLength_in_cm 3.08568e+21

MALLOC: Allocation of shared memory took 0.000273652 sec

found 13 times in output-list.
BEGRUN: Hubble (internal units) = 100
BEGRUN: h = 0.678
BEGRUN: G (internal units) = 43.0187
BEGRUN: UnitMass_in_g = 1.989e+43
BEGRUN: UnitLenth_in_cm = 3.08568e+24
BEGRUN: UnitTime_in_s = 3.08568e+19
BEGRUN: UnitVelocity_in_cm_per_s = 100000
BEGRUN: UnitDensity_in_cgs = 6.76991e-31
BEGRUN: UnitEnergy_in_cgs = 1.989e+53

EWALD: initialize Ewald correction...

EWALD: reading Ewald tables from file
`ewald_table_1-1-1_64-64-64_precision8-order3.dat'
EWALD: Initialization of periodic boundaries finished.
NGENIC: generated grid of size 128
NGENIC: computing displacement fields...
NGENIC: vel_prefac1= 1387.42 hubble_a=6937.72 fom1=0.999914
NGENIC: vel_prefac2= 2774.86 hubble_a=6937.72 fom2=1.99984
NGENIC: Dplus=19.594
NGENIC_2LPT: Computing secondary source term, derivatices 0 0
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Computing secondary source term, derivatices 1 1
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Computing secondary source term, derivatices 2 2
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Computing secondary source term, derivatices 0 1
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Computing secondary source term, derivatices 0 2
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Computing secondary source term, derivatices 1 2
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Secondary source term computed in real space
NGENIC_2LPT: Done transforming it to k-space
NGENIC_2LPT: Obtaining second order displacements for axes=0
NGENIC_2LPT: Obtaining second order displacements for axes=1
NGENIC_2LPT: Obtaining second order displacements for axes=2
NGENIC_2LPT: Obtaining Zeldovich displacements for axes=0
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Obtaining Zeldovich displacements for axes=1
NGENIC: setting up modes in kspace...
NGENIC_2LPT: Obtaining Zeldovich displacements for axes=2
NGENIC: setting up modes in kspace...

NGENIC: Maximum displacement: 0.771307, in units of the part-spacing=
3.94909


NGENIC: Maximum velocity component: 1090.86


GENERATE_GAS_IN_ICS: Generated gas particles from DM particle
distribution. TotNumGas=2097152

INIT: Testing ID uniqueness...
INIT: success. took=0.372065 sec

DOMAIN: Begin domain decomposition (sync-point 0).
DOMAIN: New shift vector determined (-16.519 13.407 4.74042)
DOMAIN: Sum=2 TotalCost=3 NumTimeBinsToBeBalanced=1 MultipleDomains=3
DOMAIN: Increasing TopNodeAllocFactor=0.08 new value=0.104
DOMAIN: Increasing TopNodeAllocFactor=0.104 new value=0.1352
DOMAIN: Increasing TopNodeAllocFactor=0.1352 new value=0.17576
DOMAIN: Increasing TopNodeAllocFactor=0.17576 new value=0.228488
DOMAIN: Increasing TopNodeAllocFactor=0.228488 new value=0.297034
DOMAIN: Increasing TopNodeAllocFactor=0.297034 new value=0.386145
DOMAIN: Increasing TopNodeAllocFactor=0.386145 new value=0.501988
DOMAIN: Increasing TopNodeAllocFactor=0.501988 new value=0.652585
DOMAIN: Increasing TopNodeAllocFactor=0.652585 new value=0.84836
DOMAIN: NTopleaves=64, determination of top-level tree involved 2
iterations and took 0.909439 sec
DOMAIN: we are going to try at most 156 different settings for combining
the domains on tasks=6, nnodes=1
DOMAIN: total_cost=2 total_load=1
DOMAIN: total_cost=2 total_load=1
DOMAIN: total_cost=2 total_load=1
DOMAIN: total_cost=2 total_load=1
DOMAIN: best solution found after 4 iterations by task=1 for nextra=0,
reaching maximum imbalance of 1.11106|1.11642
DOMAIN: combining multiple-domains took 0.0813736 sec
DOMAIN: exchange of 4194304 particles
ALLOCATE: Changing to MaxPartSph = 0
DOMAIN: particle exchange done. (took 3.19289 sec)
DOMAIN: domain decomposition done. (took in total 4.38405 sec)
PEANO: Begin Peano-Hilbert order...
PEANO: done, took 0.514037 sec.


I've found something odd!
The mass content accounts only for Omega=0.616,
but you specified Omega=0.308 in the parameterfile.

I better stop.
endrun called, calling MPI_Finalize()
bye!
============================================

I would be very grateful for your help on this issue.
Best regards,
Hassan


On Sun, Jul 4, 2021 at 12:17 PM Volker Springel <
vspringel_at_mpa-garching.mpg.de> wrote:

>
> Hi Hassan,
>
> You'd have to delete the statement
>
> if(WDM_On == 1 && WDM_Vtherm_On == 1)
> add_WDM_thermal_speeds(&block[3 * pc]);
>
> from save.c in this old version of N-GenIC. This was left in there when
> not fully cleaning up a modification for warm dark matter.
>
> Note that a simpler option is to simply feed Gadget/Arepo a DM initial
> conditions, and create the gas component on the fly for it with the
> GENERATE_GAS_IN_ICS option. Then you do not need to bother with PRODUCEGAS
> in N-GenIC at all.
>
> Regards,
> Volker
>
>
>
> > On 2. Jul 2021, at 19:34, Hassan Fathivavsari <h.fathie_at_gmail.com>
> wrote:
> >
> > Dear all,
> >
> > I am creating an Initial Condition file using N-GenIC. I could
> successfully create the
> > initial condition with PRODUCEGAS being disabled.
> >
> > But when I set PRODUCEGAS in the Makefile, I get the following error:
> >
> > pc_at_ubuntu:~/N-GenIC$ make
> > mpicc -DPRODUCEGAS -DNO64BITID -O3 -Wall
> -I/usr/local/include -I/usr/local/include -c -o main.o main.c
> > mpicc -DPRODUCEGAS -DNO64BITID -O3 -Wall
> -I/usr/local/include -I/usr/local/include -c -o power.o power.c
> > power.c: In function ‘read_power_table’:
> > power.c:59:16: warning: format not a string literal and no format
> arguments [-Wformat-security]
> > 59 | sprintf(buf, FileWithInputSpectrum);
> > | ^~~~~~~~~~~~~~~~~~~~~
> > power.c:90:16: warning: format not a string literal and no format
> arguments [-Wformat-security]
> > 90 | sprintf(buf, FileWithInputSpectrum);
> > | ^~~~~~~~~~~~~~~~~~~~~
> > mpicc -DPRODUCEGAS -DNO64BITID -O3 -Wall
> -I/usr/local/include -I/usr/local/include -c -o allvars.o allvars.c
> > mpicc -DPRODUCEGAS -DNO64BITID -O3 -Wall
> -I/usr/local/include -I/usr/local/include -c -o save.o save.c
> > save.c: In function ‘save_local_data’:
> > save.c:218:10: error: ‘WDM_On’ undeclared (first use in this function)
> > 218 | if(WDM_On == 1 && WDM_Vtherm_On == 1)
> > | ^~~~~~
> > save.c:218:10: note: each undeclared identifier is reported only once
> for each function it appears in
> > save.c:218:25: error: ‘WDM_Vtherm_On’ undeclared (first use in this
> function)
> > 218 | if(WDM_On == 1 && WDM_Vtherm_On == 1)
> > | ^~~~~~~~~~~~~
> > save.c:57:20: warning: variable ‘maxidlen’ set but not used
> [-Wunused-but-set-variable]
> > 57 | int blockmaxlen, maxidlen, maxlongidlen;
> > | ^~~~~~~~
> > save.c:56:14: warning: variable ‘blocklongid’ set but not used
> [-Wunused-but-set-variable]
> > 56 | long long *blocklongid;
> > | ^~~~~~~~~~~
> > make: *** [<builtin>: save.o] Error 1
> >
> > I would be grateful if someone could help me with this issue.
> >
> > With best regards,
> > Hassan
> >
> >
> >
> > -----------------------------------------------------------
> >
> > 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
>
>
>
>
> -----------------------------------------------------------
>
> 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
>
Received on 2021-07-05 14:37:49

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