Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when running sample_dmcosmological_6dfof_subhalo_tidal_debris on G4 #104

Open
TiagoBsCastro opened this issue Jan 16, 2021 · 2 comments

Comments

@TiagoBsCastro
Copy link

TiagoBsCastro commented Jan 16, 2021

Dear all,

I am studying Velociraptor and have tried to run the example sample_dmcosmological_6dfof_subhalo_tidal_debris on a small DM only simulation run with Gadget-4. The snapshot has been saved using gadget2 binary format compatibility. The first issue is that the implementation of the g2 binary format on gadget4 has changed, and the block for "little h" is now used for storing other information regarding the tree. I have then changed the code slightly in two points:

  1. On gadgetitems.h I have changed the header structure to:
    INTEGER npart[NGTYPE];
    double mass[NGTYPE];
    double time;
    double redshift;
    int flag_sfr;
    int flag_feedback;
    INTEGER npartTotal[NGTYPE];
    int flag_cooling;
    int num_files;
    double BoxSize;
    double Omega0;
    double OmegaLambda;
    double HubbleParam;
    double Hubble;
    INTEGER npartTotalHW[NGTYPE];
    int flag_entropy_ICs;
    int flag_stellar_age;
    int flag_metals;
    char fill[256-64- 68- 28- 24- 64- 24 - 58-64-34]; / fills to 256 Bytes, here calculation is based on 6 gadget particle types with default header stuff*/
    (...)

  2. As G4 will write other info instead of h on both HubbleParam and Hubble, I commented the line: opt.h=header[ifirstfile].HubbleParam; on ReadGadget, to not overwrite the value I declare on cfg file.

However, when running, the code returns me Segmentation Fault while searching for substructures. I am attaching here the log files, the cfg file used, and the produced output files. Any ideas on how to investigate this issue further?

The code has been compiled with:
cmake3 -DGSL_INCLUDE_DIR=$GSL_INC -DGSL_LIBRARY=$GSL_LIB/libgsl.so -DGSL_CBLAS_LIBRARY=$GSL_LIB/libgslcblas.so -DVR_GADGET_HEAD2=ON -DVR_OPENMP=ON -DVR_MPI=ON ..
make all

The code has been run with:
stf -i /beegfs/tcastro/gadget4/runs/convergence.sdumont/256p3smoothing2/snapdir_004/snap_004 -s 16 -Z 1 -o 256p3smoothing2 -C sample_dmcosmological_6dfof_subhalo_tidal_debris.cfg

tcastro.zip

Many thanks!

@TiagoBsCastro TiagoBsCastro changed the title Segmentation fauld when running sample_dmcosmological_6dfof_subhalo_tidal_debris on G4 Segmentation fault when running sample_dmcosmological_6dfof_subhalo_tidal_debris on G4 Jan 17, 2021
@pelahi
Copy link
Owner

pelahi commented Jan 18, 2021

Hi Tiago, I will have a detailed look but one thing you could try is the development branch that has a few fixes to handle some issues that could propagate later as a seg fault in master (could will at least be more informative).

@TiagoBsCastro
Copy link
Author

Hi Pelahi, thanks for the fast reply. Running it on the development branch after implementing the changes I have mentioned before, runs fine. Let me know if there is anything you want me to pack for you/run myself in order to understand it better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants