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

HIGHRES needs undocumented Extensive_interloper_properties_output config option #125

Open
Findus23 opened this issue Jun 10, 2022 · 0 comments

Comments

@Findus23
Copy link

Findus23 commented Jun 10, 2022

Describe the bug

HIGHRES cmake option causes SIGSEGV (Address boundary error) in

if (opt.iInclusiveHalo == 3) GetSOMasses(opt, nbodies, Part, ngroup, numingroup, pdata);

when setting Inclusive_halo_masses=3.

It seems like this is caused by typeparts not being set as long as none of these four options are set.

#if defined(GASON) || defined(STARON) || defined(BHON) || defined(HIGHRES)
if (opt.iextragasoutput || opt.iextrastaroutput || opt.iextrainterloperoutput || opt.iSphericalOverdensityPartList) {
typeparts[j]=Part[taggedparts[j]].GetType();
}
#endif

This causes the following to fail:
#if defined(GASON) || defined(STARON) || defined(BHON) || defined(HIGHRES)
auto typeval = typeparts[jj];
#endif

which is necessary for
#ifdef HIGHRES
if (opt.iextrainterloperoutput) {
if (typeval == DARK2TYPE || typeval == DARK3TYPE || (typeval == DARKTYPE && massval>opt.zoomlowmassdm))
{
if (rc<=pdata[i].gR200c) {
pdata[i].M_200crit_interloper+=massval;
}
if (rc<=pdata[i].gR200m) {
pdata[i].M_200mean_interloper+=massval;
}
if (rc<=pdata[i].gRBN98) {
pdata[i].M_BN98_interloper+=massval;
}
for (auto iso=0;iso<opt.SOnum;iso++) if (rc<pdata[i].SO_radius[iso]) {
pdata[i].SO_mass_interloper[iso]+=massval;
}
}
}
#endif

So the solution seems to be to add the undocumented Extensive_interloper_properties_output=1 option.

To Reproduce

  • use cmake .. -DNBODY_OPENMP=1 -DVR_HDF5=1 -DCMAKE_BUILD_TYPE=Release -DVR_MPI=OFF -DVR_ZOOM_SIM=ON
  • config.cfg.txt
  • use a zoom-in simulation (so with PartType1 and PartType2) as input file

Expected behavior
Mass of low-resolution particles should be added to halos

Environment (please complete the following information):

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

1 participant