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

GSL’s QAG routine’s limit and key should be configurable through the module #68

Open
marcpaterno opened this issue Apr 11, 2023 · 5 comments

Comments

@marcpaterno
Copy link
Collaborator

The current use of QAG has both the limit and key values hard-wired. This does not allow users to tune these parameters when needed for dealing with harder integrals.

It would be best for these parameters to be settable by the user, through the module configuration. The current values can be left as defaults.

@marcpaterno
Copy link
Collaborator Author

I’ve investigated this module further, and it looks like it does not check whether the calls it makes to the GSL integration routine gsl_integration_qag succeed. It also does report the error estimate on the integral.

@joezuntz
Copy link
Owner

@marcpaterno which module are you looking at here?

@marcpaterno
Copy link
Collaborator Author

Oops; apologies for the poor issue writing!

The module in question is boltzmann/sigma_cpp.

@zhouconghao
Copy link

I tried something more with sigma_cpp. I made a copy of the module files and change the subdivision limit and epsilon. Under this cosmology, 1E8 subdivision limit, and 1e-6 epsilon. gsl still complains this

gsl: qag.c:257: ERROR: maximum number of subdivisions reached

Cosmology:
[cosmological_parameters]
h0 = 7.71358152e-01
omega_m = 0.1 1.87518978e-01 0.3
omega_b = 0.03684521668
omega_k = 0.0
tau = 0.078
n_s = 1.06611261e+00
log1e10As = 3.90460746e+00
w = -1.0
wa = 0.0
omega_nu=0.00624525169

@zhouconghao
Copy link

I changed the integration from 15 points Gauss-Kronod to 21 points, and it works fine!

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

3 participants