Re: Setting PRODUCEGAS in N-GenIC Makefile returns error

From: Volker Springel <vspringel_at_MPA-Garching.MPG.DE>
Date: Sun, 4 Jul 2021 21:16:28 +0200

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
Received on 2021-07-04 21:16:28

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