Closed jchelly closed 6 years ago
Hi John, I am planning on updating the PriorityQueue (make it templated) but the simple workaround is to not use single precision. If memory is an issue, why not use single particle precision but leave everything else as doubles (just means particle properties are floats).
If I try to run Velociraptor on the EAGLE 100Mpc DMONLY box it gets as far as the "finished linking across MPI domains" message and then stops with a segmentation fault.
The problem seems to be in ReorderGroupIDs(). I think this function stores the number of particles in each group in a PriorityQueue and then later retrieves them. In single precision mode the PriorityQueue stores the particle number as a float so it gets rounded off if there are more than about 16 million particles in any halo. As a result, the size variable is set wrongly and it loops over the wrong number of particles.
I think a workaround would be to take only the group index from the PriorityQueue and use it to look up the particle number in the numingroup array. This doesn't entirely fix the problem because the groups might still get sorted into the wrong order if we have several halos with large but similar masses.