Closed Hao-Phys closed 7 months ago
I can reproduce the segmentation fault with
vegas((x, f) -> f[1] = cos(x[1]); atol=1e-4, maxevals=255)
but not
vegas((x, f) -> f[1] = cos(x[1]); atol=1e-4, maxevals=256)
So the problem isn't that you can't use maxevals
at all, which is completely false (as demonstrated also by the maxevals=256
case), since there's a default value of
julia> Cuba.MAXEVALS
1000000
but that the Cuba C library crashes when you use a too small value for the number of maximum evaluations, the threshold being 256. Also, this is specific to vegas
and suave
, instead cuhre
and divonne
work fine. I have changed the title to more accurately describe the issue.
You will have to report the bug to the Cuba library author Thomas Hahn
, I can't do anything about it.
Also, this is a duplicate of #12
I got segmentation error when trying to pass
maxevals
tovegas
.Minimal example:
vegas((x, f) -> f[1] = cos(x[1]); atol=1e-4, maxevals=20)
All other kwargs seem to work fine. Machine info: Pop!_OS 22.04 LTS and Apple M2 (Sonoma). Cuba version: v2.3.0