Standalone FoF issues with planetary example
Trying to test the standalone friends of friends with a very simple example of the Planetary/EarthImpact initial conditions runs apparently correctly until a seg fault before writing the output. Latest master.
Test .yml: earth_impact_test_fof.yml
Clean steps:
./configure --with-hydro=planetary --with-equation-of-state=planetary --with-gravity=basic --enable-stand-alone-fof
make -j 8
cd examples/Planetary/EarthImpact/
./get_init_cond.sh
../../fof --hydro -t 4 earth_impact_test_fof.yml
Output:
...
[00000.1] main: Running FOF on 116742 gas particles, 0 sink particles, 0 stars particles 0 black hole particles, 0 neutrino particles, and 0 DM particles (116742 gravity particles)
[00000.1] main: from t=0.000e+00 until t=3.600e+04 with 1 ranks, 4 threads / rank and 4 task queues / rank (dt_min=1.000e-06, dt_max=1.000e+03)...
[00000.1] fof_allocate: Linking length is set to 5.000000e-01 [internal units].
[00000.4] fof_search_tree: No. of groups: 2. No. of particles in groups: 116742. No. of particles not in groups: 0.
[00000.4] fof_search_tree: Largest group by size: 99740
[00000.4] engine_fof: Complete FOF search took: 270.614 ms.
Segmentation fault
As some brief wider context: with planetary simulations we often want to test multiple linking lengths, either to identify groups of different-density materials, or more generally just to constrain the uncertainties from the (usually more arbitrary than in cosmology) choice of linking length. So that's one reason why being able to run the FoF easily on a pre-existing hdf5 file like this is important instead of just running on the fly.
This issue came from a collaborator who had been running the fof successfully including writing the output files, but they said the actual particle FoF group data (PartType0/FOFGroupIDs
dataset) didn't exist in the hdf5 file. I tried this to start testing their problem and found this issue instead.
By the way, both of these problems seem fixed in the subtask_speedup
branch, where the same code runs and outputs the data correctly.