lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
223 stars 292 forks source link

Weyl potential P(k,z) segfault for some inputs #467

Open JesusTorrado opened 2 years ago

JesusTorrado commented 2 years ago

The following produces a segfault as of v3.1.2

from classy import Class
params = {'A_s': 2.204090400490399e-09, 'n_s': 0.9647522, 'H0': 67.25, 'omega_b': 0.02225203,
          'omega_cdm': 0.1198657, 'm_ncdm': 0.06, 'tau_reio': 0.07888604, 'N_ncdm': 1,
          'N_ur': 2.0328,
          'non linear': 'hmcode', 'nonlinear_min_k_max': 20,
          'output': 'mPk mTk', 'z_pk': '3.5 2 1.5 1 0.5 0', 'P_k_max_1/Mpc': 15.000000000000004}
cosmo = Class()
cosmo.set(params)
cosmo.compute()
print("works up to here!")
for b in (True, False):
    print("testing nonlinear", b)
    cosmo.get_Weyl_pk_and_k_and_z(nonlinear=b)