Integrals.jl icon indicating copy to clipboard operation
Integrals.jl copied to clipboard

CubaVegas, CubaSUAVE, CubaDivonne: Julia has exited

Open KirillZubov opened this issue 4 years ago • 2 comments

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.

KirillZubov avatar Nov 10 '20 10:11 KirillZubov

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

KirillZubov avatar May 26 '21 17:05 KirillZubov

Can you reproduce this with pure Cuba.jl?

ChrisRackauckas avatar May 26 '21 23:05 ChrisRackauckas

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.

ArnoStrouwen avatar Dec 21 '22 15:12 ArnoStrouwen