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

Benchmark macro errors for the first few times #135

Open
YingboMa opened this issue Mar 3, 2019 · 2 comments
Open

Benchmark macro errors for the first few times #135

YingboMa opened this issue Mar 3, 2019 · 2 comments
Labels

Comments

@YingboMa
Copy link

YingboMa commented Mar 3, 2019

One can reproduce the error on the benchmarkerror branch of DiffEqDevTools.jl.

MWE:

using OrdinaryDiffEq, DiffEqDevTools
prob = ODEProblem((u,p,t)->u,[1.0;0.0;0.0],(0.0,1.0))
test_sol = TestSolution(solve(prob,Rodas5(),abstol=1/10^14,reltol=1/10^14))
abstols = @. 1/10^(5:8)
reltols = @. 1/10^(1:4)

setups = [
          Dict(:alg=>Kvaerno5()),
         ]
names = ["Kvaerno5"]
wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=names,save_everystep=false,appxsol=test_sol)
julia> wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=names,save_everystep=false,appxsol=test_sol) # errors
ERROR: syntax: function argument and static parameter names must be distinct
Stacktrace:
 [1] eval at ./boot.jl:327 [inlined]
 [2] generate_benchmark_definition(::Module, ::Array{Symbol,1}, ::Array{Symbol,1}, ::Expr, ::Expr, ::Nothing, ::BenchmarkTools.Parameters) at /home/ggnore/.julia/packages/BenchmarkTools/mVOqg/src/execution.jl:296
 [3] #WorkPrecision#11(::String, ::TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}, ::Symbol, ::Int64, ::Int64, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:save_everystep, :alg),Tuple{Bool,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}}}}, ::Type{WorkPrecision}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing) at /home/ggnore/.julia/dev/DiffEqDevTools/src/benchmark.jl:192
 [4] Type at ./none:0 [inlined] (repeats 2 times)
 [5] #WorkPrecisionSet#12(::Bool, ::Array{String,1}, ::TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}, ::Symbol, ::Nothing, ::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:save_everystep,),Tuple{Bool}}}, ::Type{WorkPrecisionSet}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Dict{Symbol,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}},1}) at /home/ggnore/.julia/dev/DiffEqDevTools/src/benchmark.jl:230
 [6] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:names, :save_everystep, :appxsol),Tuple{Array{String,1},Bool,TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}}}, ::Type{WorkPrecisionSet}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Dict{Symbol,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}},1}) at ./none:0
 [7] top-level scope at REPL[8]:1

julia> wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=names,save_everystep=false,appxsol=test_sol) # errors
ERROR: syntax: function argument and static parameter names must be distinct
Stacktrace:
 [1] eval at ./boot.jl:327 [inlined]
 [2] generate_benchmark_definition(::Module, ::Array{Symbol,1}, ::Array{Symbol,1}, ::Expr, ::Expr, ::Nothing, ::BenchmarkTools.Parameters) at /home/ggnore/.julia/packages/BenchmarkTools/mVOqg/src/execution.jl:296
 [3] #WorkPrecision#11(::String, ::TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}, ::Symbol, ::Int64, ::Int64, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:save_everystep, :alg),Tuple{Bool,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}}}}, ::Type{WorkPrecision}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing) at /home/ggnore/.julia/dev/DiffEqDevTools/src/benchmark.jl:192
 [4] Type at ./none:0 [inlined] (repeats 2 times)
 [5] #WorkPrecisionSet#12(::Bool, ::Array{String,1}, ::TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}, ::Symbol, ::Nothing, ::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:save_everystep,),Tuple{Bool}}}, ::Type{WorkPrecisionSet}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Dict{Symbol,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}},1}) at /home/ggnore/.julia/dev/DiffEqDevTools/src/benchmark.jl:230
 [6] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:names, :save_everystep, :appxsol),Tuple{Array{String,1},Bool,TestSolution{Nothing,0,true,Nothing,Nothing,ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Rodas5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},DataType},OrdinaryDiffEq.InterpolationData{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Rosenbrock5ConstantCache{DiffEqDiffTools.TimeDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Nothing},DiffEqDiffTools.UDerivativeWrapper{ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},OrdinaryDiffEq.Rodas5ConstantCache{Float64,Float64}}}}}}}, ::Type{WorkPrecisionSet}, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##3#4")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Dict{Symbol,Kvaerno5{0,true,LinSolveFactorize{typeof(RecursiveFactorization.lu!)},NLNewton{Nothing,Nothing},DataType,Float64}},1}) at ./none:0
 [7] top-level scope at REPL[8]:1

julia> wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=names,save_everystep=false,appxsol=test_sol) # errors
WorkPrecisionSet of 1 wps
@gdalle
Copy link
Collaborator

gdalle commented Sep 18, 2023

@YingboMa is this still relevant?

@YingboMa
Copy link
Author

I don't know, but you can try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants