Giter Club home page Giter Club logo

class-pt's People

Contributors

ksardase avatar michalychforever avatar oliverphilcox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

class-pt's Issues

nan values in perturbations.c

Hi all,

I am currently running CLASS-PT on its own and noticed that ppw->theta_cb is NaN at perturbations.c:5268 for small values of tau. This does not throw an error but I believe it would change quite a few values in nonlinear_pt.c and would lead to the value of P_1loop being slightly off.

Best,
John

Error initializing CLASS-PT for certain values of N_ur

Hello, I am using the Python wrapper for CLASS-PT. I noticed that the following Python script works fine in initializing CLASS-PT:

from classy import Class

CPT = Class()
cosmology = {'h': 0.6736, 
      'n_s': 0.9649, 
      'omega_b': 0.02237, 
      'omega_cdm': 0.12, 
      'tau_reio': 0.0544, 
      'A_s': 2.0989031673191437e-09, 
      'z_pk': 1.5,
      'N_ur': 3.044, 
      'N_ncdm': 0
}
CPT.set(cosmology)
CPT.set({'output':'mPk', 
        'non linear':'PT',
        'IR resummation':'Yes', 
        'Bias tracers':'Yes'
})
CPT.compute()

However, when I change N_ur from 3.044 to 3.046 I get an error:

File "classy.pyx", line 393, in classy.Class.compute
classy.CosmoComputationError: 

Error in Class: spectra_init(L:5901) :error in spectra_pk(pba,ppt,ppm,pnlpt,pnl,psp);
=>spectra_pk(L:8564) :error in spectra_sigma(pba,ppm,psp,8./pba->h,0.,&(psp->sigma8));
=>spectra_sigma(L:9866) :error in spectra_pk_at_k_and_z(pba,ppm,psp,k,z,&pk,pk_ic);
=>spectra_pk_at_k_and_z(L:683) :error in spectra_pk_at_z(pba, psp, logarithmic, z, spectrum_at_z, spectrum_at_z_ic);
=>spectra_pk_at_z(L:408) :error in array_interpolate_spline(psp->ln_tau, psp->ln_tau_size, psp->ln_pk, psp->ddln_pk, psp->ln_k_size, ln_tau, &last_index, output_tot, psp->ln_k_size, psp->error_message);
=>array_interpolate_spline(L:1706) : x=9.559201e+00 > x_max=9.559201e+00

The reason I want to use N_ur = 3.046 is to compare the output with older datasets I have from when N_ur = 3.046 was the default value in CLASS.

Too many integration steps needed within interval

Hello all,

I am using CLASS-PT with MontePython3 and the boss_full_shape data available here. During the run, I occasionally get the following error:

Error in Class: background_init(L:655) :error in background_solve(ppr, pba); => background_solve(L:1596) :error in generic_integrator(background_derivs, tau_start, tau_end, pvecback_integration, &bpaw, ppr-> tol_background_integration, ppr->smallest_allowed_variation, &gi); => generic_integrator(L:127) :error; Too many integration steps needed within interval [528.247 : 593.7], the system of equations is probably buggy or featuring a discontinuity

While the error does not stop the run, I was curious about its origin, its effects on the quality of the chain, and how it may be fixed?

How are S8 and sigma8 calculated in CLASS-PT

Dear all,

I have been using CLASS-PT to analyse an early dark energy extension to LCDM. The matter power spectra computed using 1-loop PT in CLASS-PT differs (as expected) from the MPS computed using linear perturbation theory in CLASS-EDE. However, when I get class to output the sigma8 and S8 parameters in both setups I get very similar values for the same input parameters- leading me to think that the calculation of these parameters doesn't take into account non-linear corrections; is there a way to include these corrections and output the corresponding values of S8 and sigma8 using CLASS-PT?

Thank you!

Alex

Compiling Issue on Mac (OS Monterrey, M2 processor)

Hi,

After git cloning https://github.com/Michalychforever/CLASS-PT.git (git pull results in

From https://github.com/Michalychforever/CLASS-PT

  • branch HEAD -> FETCH_HEAD
    Already up to date.

Otherwise, it says "no .git repository" without "git clone"), and changing the path to where I have OpenBLAS installed ("/opt/homebrew/opt/openblas/lib/libopenblas.a"), typing "make clean; make" results in the following error:

ld: warning: could not create compact unwind for _LAPACKE_ztz_nancheck: registers 27 and 28 not saved contiguously in frame
Undefined symbols for architecture arm64:
"_GOMP_parallel", referenced from:
_exec_blas in libopenblas.a(blas_server.o)
"_omp_get_max_threads", referenced from:
_blas_thread_init in libopenblas.a(blas_server.o)
_casum_k_NEOVERSEN1 in libopenblas.a(casum_k_NEOVERSEN1.o)
_casum_k_THUNDERX2T99 in libopenblas.a(casum_k_THUNDERX2T99.o)
_casum_k_THUNDERX3T110 in libopenblas.a(casum_k_THUNDERX3T110.o)
_ccopy_k_NEOVERSEN1 in libopenblas.a(ccopy_k_NEOVERSEN1.o)
_ccopy_k_THUNDERX2T99 in libopenblas.a(ccopy_k_THUNDERX2T99.o)
_ccopy_k_THUNDERX3T110 in libopenblas.a(ccopy_k_THUNDERX3T110.o)
...
"_omp_get_num_threads", referenced from:
_exec_blas._omp_fn.0 in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.1 in libopenblas.a(blas_server.o)
"_omp_get_thread_num", referenced from:
_exec_threads in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.0 in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.1 in libopenblas.a(blas_server.o)
"_omp_in_parallel", referenced from:
_casum_k_NEOVERSEN1 in libopenblas.a(casum_k_NEOVERSEN1.o)
_casum_k_THUNDERX2T99 in libopenblas.a(casum_k_THUNDERX2T99.o)
_casum_k_THUNDERX3T110 in libopenblas.a(casum_k_THUNDERX3T110.o)
_ccopy_k_NEOVERSEN1 in libopenblas.a(ccopy_k_NEOVERSEN1.o)
_ccopy_k_THUNDERX2T99 in libopenblas.a(ccopy_k_THUNDERX2T99.o)
_ccopy_k_THUNDERX3T110 in libopenblas.a(ccopy_k_THUNDERX3T110.o)
gcc+gfortran_compiles

  _cdotc_k_NEOVERSEN1 in libopenblas.a(cdotc_k_NEOVERSEN1.o)
  ...

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [class] Error 1

To see if it's a gcc/gfortran compiling issue, I tries compiling simple scripts in both C and Fortran, and they both compiled (in screenshot for reference), so I don't think it's a M2 gcc compiler issue as previously thought.
Is there a way to fix this?
Thank you so much for any help/

Segmentation Fault problem

I have been trying to install the CLASS-PT in a cluster and to do so, I load the anaconda and create a new environment with specific versions of NumPy. Following your suggestion in the Troubleshooting file, I have tried to use both NumPy 1.14 and 1.15 but the segmentation fault still persists. Before compiling everything I checked if Python is indeed using the desired versions of NumPy. I have also tried to compile older versions of Openblas but I had no success. Do you have any idea about what may be causing this?

CLASS-PT extension accounting for external P(k,z=0)

Dear Anton Chudaykin, Mikhail M. Ivanov, Marko Simonović, and anyone else who can help to resolve this issue,,

I am trying to implement the Leading Order and Next to Leading Order power spectrum, P_{LO}(k),P_{NLO} using the CLASS-PT and as an input to CLASS-PT the external linear power spectrum from flagship, i.e. P_L^{Flagship}(z=0,k), but as far as I understood:

  1. the CLASS-PT and CLASS, have only modules from which one can use as an input an external power spectrum, but this external power spectrum should correspond to the primordial power spectrum.
  2. the CLASS-PT and CLASS (as well as CAMB) Einstein-Boltzmann (EB) solver, basically solve those EB equations assuming the input fiducial cosmological parameters and some guess for the initial power spectrum. This means that the output will be the linear power spectrum at redshift z,z=0, and also a corresponding, growth factor, D(z).
  3. Any FFTlog code, basically represents the P_L(z=0,k) in the form of a Series expansion with the base the k and some coefficients which are evaluated for the P_L(z=0,k), which leads to the output linear power spectrum \bar{P}_{L}(z=0,k). I guess this mean that the code solves EB for \bar{P}_L(k,z=0) and the growth factor D(z).

Given 1, 2, 3, how one can extend the CLASS-PT to calculate the P_{LO}(k) and P_{NLO}(k), using an external P_L(k,z=0) ?

Kind regards,
Pierros (email: pntelis -at- cppm.in2p3.fr)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.