Hi Asitav,
You are using here the (deprecated) file format 2 of older versions of gadget. This binary format cannot in many cases tolerate different compile-time settings of the code when reading files compared to the settings adopted when the files were written. The particular error message you got is unfortunately not particularly informative, but it could be produced in this form if your Gadget3 input files really populate more than 2 of the default number of 6 possible particles types (this number of NTYPES=6 is fixed for Gadget3), and not just 2 like you forced Gadget4 to assume through your setting NTYPES=2.
So one option would be to retry with NTYPES=6. I note that the softening values you borrowed from an apparently unrelated simulation seem also seem not right... but they should at least not prevent the code from running.
Regards,
Volker
ps: I stress again that the HDF5 file format should be used, and not the deprecated old formats 1 and 2 (there is really no excuse to keep using the latter for any new simulation). The HDF5 format would in principle tolerate the above change of NTYPES if this is really the problem. Also, it would actually contain information about the settings that had been used to produce the data in the first place.
> On 1. Jun 2022, at 08:52, Mishra, Asitav <Asitav.Mishra_at_amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> I am using Gadget4 to run the test case. The config files and parameter files are simply that were used for Gadget3, but have been modified to be consistent with Gadget4.
>
> Asitav
>
> Get Outlook for iOS
> From: Tiago Castro <tiagobscastro_at_gmail.com>
> Sent: Tuesday, May 31, 2022 11:28:48 PM
> To: Gadget General Discussion <gadget-list_at_MPA-Garching.MPG.DE>
> Subject: Re: [gadget-list] Target bytes and src bytes mismatch on box3hr
>
> [CAUTION: External Email]
> Hi,
>
> Then it is ok. I got confused because you named the IC file as the snapshot. I believe Gadget will just ignore this if you pass Flag 2. But, again, I am confused, are you using Gadget-3 or 4 to restart the simulation?
>
> Cheers,
>
> Em qua., 1 de jun. de 2022 às 08:24, Mishra, Asitav <Asitav.Mishra_at_amd.com> escreveu:
> [AMD Official Use Only - General]
>
> Tiago,
>
> Thank you so much for your response. I believe I'm using restart option "2" to run. This is how I run the case:
> srun -N $SLURM_NNODES -n $SLURM_NPROCS ./Gadget4 box3_hr.par 2 44
>
> Does that look OK?
>
> Best,
> Asitav
> From: Tiago Castro <tiagobscastro_at_gmail.com>
> Sent: Tuesday, May 31, 2022 10:53 PM
> To: Gadget General Discussion <gadget-list_at_MPA-Garching.MPG.DE>
> Subject: Re: [gadget-list] Target bytes and src bytes mismatch on box3hr
>
> [CAUTION: External Email]
> Hi Asitav,
>
> I notice that the TimeBegin is still set to the original simulation IC (z=60.0). I am guessing here and hope someone with more experience can help you further. But it seems you are restarting a run from the snapshot that is not at z=60, is it right? If you want to restart from this snapshot, you should fix it to the redshift of the snapshot. In any case, I would recommend you use the Gadget flag to restart from the snapshot file instead of using it as the ICs. I believe the flag is "2", but you can check it by just running Gadget without a parameter file.
>
> Cheers,
> ---
>
> Em qua., 1 de jun. de 2022 às 01:44, Mishra, Asitav <Asitav.Mishra_at_amd.com> escreveu:
> [AMD Official Use Only - General]
>
> Hello all,
>
> Sorry for spamming the mail-list with my earlier email. This e-mail corrects the subject line.
>
> I am running a Gadget3 format snap file (Box/3hr) and I get byte mismatch on target vs src byte sizes. A similar post on the mail archive didn't help much since I don't have the same parameters set. I may be missing some configuration input parameters (see attached the Config.sh and parameter file). I am using files that are modified from existing Gadget3 Config and parameter files. The relevant error I get are:
>
> READIC: filenr=0, './/snapdir_044/snap_044.0' contains:
> 180 READIC: Type 0 (gas): 0 (tot= 0) masstab= 0
> 181 READIC: Type 1: 2950892 (tot= 191102976) masstab= 0.0138889
> 182
> 183 READIC: Reading file `.//snapdir_044/snap_044.0' on task=0 and distribute it to 0 to 6.
> 184 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 185 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 186 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 187 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 188 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 189 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 190 SNAPSHOT: writing snapshot Reading header => 'HEAD' (264 byte)
> 191 Code termination on task=32, function type_cast_data(), file src/io/io.cc, line 1389: Strange conversion requested: target_bytes_per_element=24 src_bytes_per_element=23
>
> Any inputs or suggestions would be great.
>
> Thanks,
> Asitav
>
>
> -----------------------------------------------------------
>
> 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 2022-06-01 20:22:38