Re: bytes_per_element target and src mismatch

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

Hi Julianne,

This is probably because your ICs do not contain hydro-forces but Gadget4 tries to read them anyway...

Presumably this is because you have OUTPUT_ACCELERATION enabled. So one solution might be to disable this (but then you won't get accelerations in the output).

Alternatively you could locate line 91 in src/io/snap_io.cc,

init_field("HACC", "HydroAcceleration", MEM_MY_FLOAT, FILE_MY_IO_FLOAT, READ_IF_PRESENT, 3, A_SPHP, &Sp->SphP[0].HydroAccel, 0,
             GAS_ONLY, 0, 0, 0, 0, 0, 0, 0);

and change the constant "READ_IF_PRESENT" to "SKIP_ON_READ". This should in principle also help.

Best,
Volker

ps: Having the input files in HDF5 would be an even better way to fix this and related problems.

> On 4. Jul 2021, at 19:33, Goddard, Julianne K. <Julianne.Goddard_at_uky.edu> wrote:
>
> Hello All,
>
> I am very new to Gadget and I am trying to run a periodic cosmological zoom simulation on Gadget-4 using initial conditions generated with MUSIC. When the initial conditions are being read I get this error:
>
> READIC: filenr=0, './ICs/ics_zoom_gadget_12.dat' contains:
> READIC: Type 0 (gas): 26556504 (tot= 26556504) masstab= 2.42811e-06
> READIC: Type 1: 26556504 (tot= 26556504) masstab= 1.31199e-05
> READIC: Type 2: 0 (tot= 0) masstab= 0
> READIC: Type 3: 0 (tot= 0) masstab= 0
> READIC: Type 4: 0 (tot= 0) masstab= 0
> READIC: Type 5: 18115397 (tot= 18115397) masstab= 0
>
> READIC: Reading file `./ICs/ics_zoom_gadget_12.dat' on task=0 and distribute it to 0 to 31.
> READIC: reading block 0 (Coordinates)...
> READIC: reading block 1 (Velocities)...
> READIC: reading block 3 (HydroAcceleration)...
> Code termination on task=0, function type_cast_data(), file src/io/io.cc, line 1387: Strange conversion requested: target_bytes_per_element=24 src_bytes_per_element=10
>
> Any help is appreciated,
>
> Julianne
>
>
>
>
>
> -----------------------------------------------------------
>
> 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:36:34

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