Crash when compiling with grackle_1 2 or 3 but running without --cooling
In the current implementation, we can compile with grackle_0
and run a simulation without --cooling
. It works fine. However, if we compile with grackle_X
, X > 0, the code crashes without saying why...
Debugging shows that the code crashes in cooling_first_init_part()
because it calls an uninitialised grackle_data
object. The data are initialized in cooling_init_backend()
. However, since we are running without cooling, this function is not called.
The solution would be to pass the information of whether we run with cooling to cooling_first_init_part()
and return if we run without cooling.