Dear Hassan,
The compilation error in line 600 of cooling.cc is odd... the characters '1111' should not be there. I think you perhaps added them by accident as they are not in the original source.
Note: You will also have to increase NTYPES to at least 5, as for traditional resason new stars are created with type=4 (default for STAR_TYPE)
Regards,
Volker
> On 1. Jul 2021, at 19:58, Hassan Fathivavsari <h.fathie_at_gmail.com> wrote:
>
> Dear all,
>
> I am trying to simulate Large-scale structure formation including gas + cooling + star formation.
> I used the Config.sh file from the /example/G2-lcdm-gas folder as the template and modified it
> as follows in order to include the cooling and star formation processes:
>
> # Basic code operation
> PERIODIC
> SELFGRAVITY
> NTYPES=3
> NSOFTCLASSES=1
> # Gravity options
> PMGRID=128
> # Miscellaneous code options
> DOUBLEPRECISION=1
> GADGET2_HEADER
>
> COOLING
> STARFORMATION
>
> As shown above I changed NTYPES from 2 to 3 and I also included COOLING and
> STARFORMATION keys in order to activate these two processes.
>
> After these modification I tried to compile the code again by issuing the following command:
>
> pc_at_ubuntu:~/Desktop/SPH/gadget4-master$ make DIR=./examples/G2-lcdm-gas/
>
> But after compiling for about a minute, it crashed with the following error:
>
> mpicxx -std=c++11 -O3 -Wall -I/hdf5/build/include -I/usr/local/include -I/usr/local/include -I./examples/G2-lcdm-gas//build -Isrc -c src/cooling_sfr/cooling.cc -o examples/G2-lcdm-gas//build/cooling_sfr/cooling.o
> src/cooling_sfr/cooling.cc: In member function ‘void coolsfr::IonizeParamsUVB()’:
> src/cooling_sfr/cooling.cc:600:41: error: expected ‘;’ before ‘}’ token
> 600 | pc.epsHep = PhotoTUVB[0].eHep;1111
> | ^
> | ;
> 601 |
> 602 | }
> | ~
> src/cooling_sfr/cooling.cc:600:37: warning: statement has no effect [-Wunused-value]
> 600 | pc.epsHep = PhotoTUVB[0].eHep;1111
> | ^~~~
> make: *** [Makefile:505: examples/G2-lcdm-gas//build/cooling_sfr/cooling.o] Error 1
>
> I would be grateful for any insight into this problem.
> 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 20:52:38