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

Reading RAMSES particle files returns 0 particles #106

Open
currodri opened this issue Feb 2, 2021 · 3 comments
Open

Reading RAMSES particle files returns 0 particles #106

currodri opened this issue Feb 2, 2021 · 3 comments

Comments

@currodri
Copy link

currodri commented Feb 2, 2021

Describe the bug
Hello all! I am testing VELOCIraptor with a small zoom cosmological RAMSES simulation. It is a hydro run, but I decided to begin with the search of structure only on the DM particles. Unfortunately, I am having issues getting to work fine. It appears that when the code reaches the point of reading the DM particles in the part_xxxxx.outxxxxx files it does not find a single particle.

For what I have been reading in the repository, it appears that the improper reading of the unformatted fortran outputs is causing a couple of issues (see #103 and #105). For what I can see, it appears that some of these issues are still present in the master branch, which may be causing the incorrect reading of the particle files.

To Reproduce
Steps to reproduce the behavior:

  1. Compile VELOCIraptor with the following flags: -DVR_MPI:BOOL=ON, -DNBODY_OPENMP:BOOL=ON -DVR_OPENMP:BOOL=ON, -DVR_HDF5:BOOL=ON, -DVR_NO_MASS:BOOL=OFF -DVR_USE_STAR:BOOL=OFF -DVR_USE_GAS:BOOL=OFF, -DVR_ZOOM_SIM:BOOL=ON -DVR_STRUCTURE_DEN:BOOL=ON
  2. Copy the sty executable to the simulation root directory.
  3. Run the following command: ./stf -i output_00013 -I 4 -o stfout -t 00013 -C sample_zoomhydrocosmological_run.cfg
  4. When it reaches the point of reading the header, it finds 0 particles, rendering the search of structure impossible and returning a Segmentation fault.
    crodriguez.zip

Log files
Included in the crodriguez.zip file attached to this issue.

Environment (please complete the following information):

  • OS: Ubuntu 18.04.5 LTS
  • Libraries: Intel Compilers 2018, Intel MPI 2018, gsl/1.16-gcc

Additional context
It appears that a zoom simulation required the parameter Effective_Resolution. I have not provided one, since I do not understand what the documentation means by it and how it would applied in a geometrically refined region like the ones used in RAMSES. It appears that is used in the computation of the DM particle mass, which could be related to the problem at hand…

I have also tried compiling without MPI and OpenMP, but I get the same result.

@pelahi
Copy link
Owner

pelahi commented Feb 2, 2021

Hi @currodri, it would help if you could describe the RAMSES format you are trying to load. I've encountered several different formats with different amounts of information in the header and different locations for number of particles in the header. I have tried to implement the ramses read routines for a format used by the horizon-AGN team, which may differ from your format. If you could describe in detail the format for all files, I might be able to quickly suggest a solution. Otherwise, you may have to implement some print statements when reading the data to see where a discrepancy is occurring.

@currodri
Copy link
Author

currodri commented Feb 2, 2021

Hi @pelahi, thank you for your fast response. For what I can find, comparing my version of RAMSES and the one used in HorizonAGN does not present differences in the header. However, it appears that the OmegaM and OmegaB values read from info_xxxxx.txt are wrong (OmegaM has the value of the Hubble constant and OmegaB the value of omega_k, hence, everything displaced up 1 place). This is the look of an info file in my simulation:

ncpu = 60
ndim = 3
levelmin = 7
levelmax = 20
ngridmax = 1000000
nstep_coarse= 500

boxlen = 0.100000000000000E+01
time = -0.100502200516321E+02
aexp = 0.723028971234283E-01
H0 = 0.720000000000000E+02
omega_m = 0.257999986410141E+00
omega_l = 0.741999983787537E+00
omega_k = 0.298023223876953E-07
omega_b = 0.450000017881393E-01
unit_l = 0.278366132687547E+25
unit_d = 0.665235514722079E-26
unit_t = 0.223629770998867E+16

Besides this, I believe some of the differences that I am finding compared to running VELOCIraptor with a HorizonAGN output are due to the fact that I am using a zoom simulation. Do you allow for different DM particle masses in the ramsesio.cxx script? If that is the case, what would you need to be this Neff in this line:

dmp_mass = 1.0 / (opt.Neff*opt.Neff*opt.Neff) * (OmegaM - OmegaB) / OmegaM;

Again, thank you so much for your time!

@pelahi
Copy link
Owner

pelahi commented Nov 17, 2021

Hi @currodri,
My apologies for this unacceptably late follow-up (life has been busy and this issue slipped below my radar). Were you able to sort out the RAMSES io issue? I can also point you to https://github.com/JinsuRhee/VELOCIraptor-STF. Jinsu has updated the ramses input to load HorizonAGN zoom sims.
Cheers,
Pascal

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