dgrin1 / axionCAMB

MIT License
19 stars 7 forks source link

Running axioncamb with certain mass and fraction mass gives me "segmentation fault occurred" error #10

Open Dhell96 opened 2 years ago

Dhell96 commented 2 years ago

It's a strange behaviour, but when running axionCAMB with for example 2.15E-26eV and 0.05 mass fraction i get segmentation error. But this happens only with certain pair of parameters. Here's the error. Input Mass Axion 2.15E-26 Axion Fraction 0.05 ----actual fraction: 5.000000074505806E-002 ----actual axion mass: 2.150000000000000E-026 (w0, wa) = (-1.00000, 0.00000) Reion redshift = 49.998 Om_b h^2 = 0.023289 Om_c h^2 = 0.134569 Om_nu h^2 = 0.000017 Om_Lambda = 0.672695 H0 = 71.000000 Om_ax h^2 = 0.007083 a_osc = NaN ma/eV = 0.21E-25 Om_K = 0.000000 Om_m (1-Om_K-Om_L) = 0.327305 100 theta (CosmoMC) = NaN N_eff (total) = 3.040000 1 nu, g= 1.0133 m_nu*c^2/k_B/T_nu0= 9.48 (m_nu= 0.002 eV) forrtl: severe (174): SIGSEGV, segmentation fault occurred Image PC Routine Line Source camb 00000000004D0F2A Unknown Unknown Unknown libpthread-2.31.s 0000153916CE83C0 Unknown Unknown Unknown camb 000000000043B903 Unknown Unknown Unknown camb 0000000000458D8C Unknown Unknown Unknown camb 0000000000445BCD Unknown Unknown Unknown camb 00000000004951B7 Unknown Unknown Unknown camb 00000000004B3FB8 Unknown Unknown Unknown camb 00000000004BC8ED Unknown Unknown Unknown camb 00000000004038E2 Unknown Unknown Unknown libc-2.31.so 0000153916B080B3 __libc_start_main Unknown Unknown camb 00000000004037EE Unknown Unknown Unknown

i just added a read/write in the code for the mass and the fraction, but works most of the times. Any ideas?

Dhell96 commented 2 years ago

Sorry, i pasted the code in a very bad way. Here is it with a screenshot: Error

dgrin1 commented 2 years ago

Hello there - I was able to reproduce your error and a collaborator found a similar issue a few onths ago. It happens or some very narrow range of parameters - I am not sure, but I believe it has to do with how some interpolation routines may work when axions begin to oscillate around the same time neutrinos become non-relativistic. I found that even a tiny change in omega_ax h^2 gets the error to go away. I also found that turning of neutrinos makes it go away. Out of curiosity what compiler are you using? I'll work on this but I don't have an answer yet

Dhell96 commented 2 years ago

Hi sorry for my late answer but i do not receive notifications (i will try to fix). I reached your same conclusions and i "fixed" the problem changing a little bit the parameters. To answer your question, i'm working with the Intel® Fortran Compiler

Hope that my "problem" could help in some sense!

dgrin1 commented 2 years ago

Did you try turning massive neutrinos off, by any chance?