Integrals.jl
Integrals.jl copied to clipboard
CubaVegas, CubaSUAVE, CubaDivonne: Julia has exited
For small values of abstol
, reltol
, maxiters
, we get the exit error in solve
for CubaVegas, CubaSUAVE, CubaDivonne.
using Quadrature, Cuba
f(x,p) = sum(sin.(x .* p))
lb = ones(2)
ub = 3ones(2)
p = [1.5,2.0]
prob = QuadratureProblem(f,lb,ub,p)
algs = [CubaVegas(), CubaSUAVE(), CubaDivonne()]
for alg in algs
solve(prob,alg,reltol=1e-4,abstol=1e-4, maxiters =200)[1]
end
#Julia has exited.
It looks like the problem is that methods crash if it doesn't converge enough (to reltol and abstol
)and it ends on the maxiters
.
Since it all works with large enough maxiters
.
using Quadrature, Cuba
f(x,p) = sum(sin.(x .* p))
lb = ones(2)
ub = 3ones(2)
p = [1.5,2.0]
prob = QuadratureProblem(f,lb,ub,p)
algs = [CubaVegas(), CubaSUAVE(), CubaDivonne()]
for alg in algs
solve(prob,alg,reltol=1e-4,abstol=1e-4, maxiters = typemax(Int))[1]
end
Can you reproduce this with pure Cuba.jl?
I think we handle this with https://github.com/SciML/Integrals.jl/pull/124 Something goes wrong with cuba when the number of iters is too low? @KirillZubov you might want to report this to Cuba.jl since we can't fix this here.