GADGET4 won't load mass block for variable masses?

From: Balázs Pál <>
Date: Fri, 19 Mar 2021 12:54:20 +0100

Dear Gadget community!

I'm trying to run GADGET4 with variable masses and with only a single
particle type. My IC file is created using the `glio` python package ( and thus it is encoded as a legacy format 1
file. The masstable in the header is set to 0 for all of the particle
types, and a mass block is added to the file as required, in the very same
manner as the header, ID, position and velocity blocks.

The output file itself seems to be correct, because the GadgetViewer 1.1.1
tool loads it without any problem and also displays the variable masses
correctly using the "color by property > Mass" display option. However,
when the file is loaded as an IC for a GADGET4 executable which was
compiler with the GADGET2_HEADER option, the masses (the mass block itself)
are not loaded, as shown in the output log, when GADGET4 loads the IC:
[19/03/21 11:15:58] READIC: Reading file `/path/to/IC_file' on task=0 and
distribute it to 0 to 3.
[19/03/21 11:15:58] READIC: reading block 0 (Coordinates)...
[19/03/21 11:15:58] READIC: reading block 1 (Velocities)...
[19/03/21 11:15:58] READIC: reading block 2 (ParticleIDs)...
[19/03/21 11:15:58] READIC: reading done. Took 0.000970569 sec, total size
0.219276 MB, corresponds to effective I/O rate of 225.926 MB/sec
GADGET4 stops at the beginning of the very first iteration, since it
detects a zero mass system (with error, that mass content corresponds to
Omega_m = 0, but I've specified Omega_m=0.3111 in the parameterfile).

Where's the problem? What do I need to do to successfully start this
GADGET4 simulation with variables masses, besides those I've discussed

The IC file that I try to run is too large, but I'm sending the full log
and my file too as attachments to this message.

Thanks for any help in advance!


Received on 2021-03-19 12:54:44

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