Re: G4-NGENIC: gsl: qag.c:257: ERROR: maximum number of subdivisions reached

From: Volker Springel <vspringel_at_MPA-Garching.MPG.DE>
Date: Sat, 1 May 2021 14:37:57 +0200

Hi Tiago,

I'm guessing but this happens likely because of an accuracy issue in evaluating the numerical integral(s) in the function ngenic::ngenic_tophat_sigma2() in src/ngenic/power.cc. The integrand is oscillatory, making it sometimes tricky to evaluate it numerically to the relative low error specified to the GSL numerical integration routine.

This function is called from ngenic::print_spec(void) in src/ngenic/ngenic.cc when producing the auxiliary file output file variance.txt. Since the latter is not really needed, you can simply disable the computation of 'variance.txt' (or reduce the accuracy goals of the gsl_integration_qag() call).

Regards,
Volker

> On 30. Apr 2021, at 19:31, Tiago Castro <tiagobscastro_at_gmail.com> wrote:
>
> Dear list,
>
> I have tried to run an Einstein de Sitter/power-law power-spectrum nbody simulation with G4. However, during IC creation, gadget returns the error bellow if the spectrum is steeper than k**-2. For the specific log pasted, the power spectrum was k**-2.5. Have someone faced a similar issue?
>
>
> Kind regards,
> Tiago.
> ----
> MALLOC: Allocation of shared memory took 0.00993109 sec
>
> found 63 times in output-list.
> BEGRUN: Hubble (internal units) = 0.1
> BEGRUN: h = 0.6766
> BEGRUN: G (internal units) = 43018.7
> BEGRUN: UnitMass_in_g = 1.989e+43
> BEGRUN: UnitLenth_in_cm = 3.08568e+21
> BEGRUN: UnitTime_in_s = 3.08568e+16
> BEGRUN: UnitVelocity_in_cm_per_s = 100000
> BEGRUN: UnitDensity_in_cgs = 6.76991e-22
> BEGRUN: UnitEnergy_in_cgs = 1.989e+53
>
> NGENIC: generated grid of size 1024
> NGENIC: computing displacement fields...
> NGENIC: vel_prefac1= 5.57763 hubble_a=55.7764 fom1=0.999999
> NGENIC: vel_prefac2= 11.1553 hubble_a=55.7764 fom2=2
> found 800 rows in input spectrum table
>
> Normalization of spectrum in file: Sigma8 = 0.8277
> Normalization adjusted to Sigma8=0.83 (Normfac=1.00556)
>
> NGENIC: Dplus=78.5555
> NGENIC_2LPT: Computing secondary source term, derivatices 0 0
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Computing secondary source term, derivatices 1 1
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Computing secondary source term, derivatices 2 2
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Computing secondary source term, derivatices 0 1
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Computing secondary source term, derivatices 0 2
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Computing secondary source term, derivatices 1 2
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Secondary source term computed in real space
> NGENIC_2LPT: Done transforming it to k-space
> NGENIC_2LPT: Obtaining second order displacements for axes=0
> NGENIC_2LPT: Obtaining second order displacements for axes=1
> NGENIC_2LPT: Obtaining second order displacements for axes=2
> NGENIC_2LPT: Obtaining Zeldovich displacements for axes=0
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Obtaining Zeldovich displacements for axes=1
> NGENIC: setting up modes in kspace...
> NGENIC_2LPT: Obtaining Zeldovich displacements for axes=2
> NGENIC: setting up modes in kspace...
>
> NGENIC: Maximum displacement: 1061.45, in units of the part-spacing= 1.08692
>
>
> NGENIC: Maximum velocity component: 5919.66
>
> gsl: qag.c:257: ERROR: maximum number of subdivisions reached
> Default GSL error handler invoked.
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
Received on 2021-05-01 14:37:58

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET