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

Update implicit methods to use lazy W #96

Merged
merged 16 commits into from
Aug 1, 2018

Conversation

MSeeker1340
Copy link
Contributor

Mimics what is done to OrdinaryDiffEq SciML/OrdinaryDiffEq.jl#460 in StochasticDiffEq.

Notes:

  1. I'm not sure if this is a mistake or deliberate choice:
    https://github.com/JuliaDiffEq/StochasticDiffEq.jl/compare/master...MSeeker1340:implicit-update?expand=1#diff-35ab888388acf2e7239e17f33e5eefe7R20
    In OrdinaryDiffEq integrator.eigen_est is updated regardless of which branch calc_J! takes, but this is not the case for StochasticDiffEq.

  2. In StochasticDiffEq the return values of calc_W! for constant caches is (J, W), whereas in OrdinaryDiffEq only W is returned. This seems a bit inconsistent (but on the other hand they are separate packages, so maybe it is ok?).

  3. alg_cache in StochasticDiffEq does not have the dt parameter (again an inconsistency), so I've chosen to use zero(t) as the initial value of dtgamma in the construction of WOperator. The initial value should not matter though as it is always reset in calc_W!.

  4. When I try to use custom mass matrices I got the error message "Algorithm must be set as symplectic or theta=1 for mass matrices". @ChrisRackauckas can you explain what this means? (Currently all mass matrices in the test scripts are I).

  5. It occurred to me that the integration tests for OrdinaryDiffEq (in utility_tests.jl) do not work for StochasticDiffEq because the solution is indeterministic, thus cannot be compared. I'm not sure how to modify it though. Maybe do a Monte Carlo simulation?

@coveralls
Copy link

coveralls commented Jul 30, 2018

Coverage Status

Coverage decreased (-1.07%) to 88.231% when pulling 3819478 on MSeeker1340:implicit-update into e9ed496 on JuliaDiffEq:master.

@ChrisRackauckas
Copy link
Member

I'm not sure if this is a mistake or deliberate choice:
https://github.com/JuliaDiffEq/StochasticDiffEq.jl/compare/master...MSeeker1340:implicit-update?expand=1#diff-35ab888388acf2e7239e17f33e5eefe7R20
In OrdinaryDiffEq integrator.eigen_est is updated regardless of which branch calc_J! takes, but this is not the case for StochasticDiffEq.

@YingboMa ?

In StochasticDiffEq the return values of calc_W! for constant caches is (J, W), whereas in OrdinaryDiffEq only W is returned. This seems a bit inconsistent (but on the other hand they are separate packages, so maybe it is ok?).

We should try to be consistent where possible, so if it's not to difficult we should change this.

alg_cache in StochasticDiffEq does not have the dt parameter (again an inconsistency), so I've chosen to use zero(t) as the initial value of dtgamma in the construction of WOperator. The initial value should not matter though as it is always reset in calc_W!.

That's fine.

@ChrisRackauckas
Copy link
Member

When I try to use custom mass matrices I got the error message "Algorithm must be set as symplectic or theta=1 for mass matrices". @ChrisRackauckas can you explain what this means? (Currently all mass matrices in the test scripts are I).

http://docs.juliadiffeq.org/latest/solvers/sde_solve.html#Stiff-Methods-1

Set theta=1 in those algorithms which need it in order to have them support mass matrices.

@ChrisRackauckas
Copy link
Member

It occurred to me that the integration tests for OrdinaryDiffEq (in utility_tests.jl) do not work for StochasticDiffEq because the solution is indeterministic, thus cannot be compared. I'm not sure how to modify it though. Maybe do a Monte Carlo simulation?

A lot of those don't need the same solution, for example just checking the W operator. But when you do need to check it, you can use a noise process generated by a pre-determined noise grid. For an example see this:

https://github.com/JuliaDiffEq/DiffEqDevTools.jl/blob/master/src/benchmark.jl#L236-L241

@codecov
Copy link

codecov bot commented Jul 31, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@e9ed496). Click here to learn what that means.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #96   +/-   ##
=========================================
  Coverage          ?   88.73%           
=========================================
  Files             ?       33           
  Lines             ?     1447           
  Branches          ?        0           
=========================================
  Hits              ?     1284           
  Misses            ?      163           
  Partials          ?        0
Impacted Files Coverage Δ
src/perform_step/implicit_split_step.jl 64.58% <0%> (ø)
src/caches/sdirk_caches.jl 100% <100%> (ø)
src/derivative_utils.jl 100% <100%> (ø)
src/perform_step/sdirk.jl 74.25% <100%> (ø)
src/caches/kencarp_caches.jl 100% <100%> (ø)
src/caches/implicit_split_step_caches.jl 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9ed496...3819478. Read the comment docs.

@MSeeker1340
Copy link
Contributor Author

For the integration, I figured the simplest solution is to reset the random seed every time solve is called, in a sense enforcing deterministic solution which can then be compared.

Currently all tests except for split_tests.jl pass. The split tests error on master as well so I don't think it has anything to do with the current PR. Stack trace:

Split Tests: Error During Test at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\runtests.jl:51
  Got exception LoadError("C:\\Users\\MSeeker\\.julia\\dev\\StochasticDiffEq\\test\\split_tests.jl", 97, MethodError(size, (nothing,), 0x0000000000006c85)) outside of a @test
  LoadError: MethodError: no method matching size(::Nothing)
  Closest candidates are:
    size(::Any, !Matched::Integer, !Matched::Integer) at deprecated.jl:53
    size(::Any, !Matched::Integer, !Matched::Integer, !Matched::Integer...) at deprecated.jl:53
    size(!Matched::BitArray{1}) at bitarray.jl:70
    ...
  Stacktrace:
   [1] axes at .\abstractarray.jl:83 [inlined]
   [2] materialize!(::Nothing, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(identity),Tuple{Array{Float64,1}}}) at .\broadcast.jl:732
   [3] (::getfield(Main, Symbol("##21#22")))(::Nothing, ::Array{Float64,1}, ::Nothing, ::Float64) at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\split_tests.jl:91
   [4] perform_step! at C:\Users\MSeeker\.julia\dev\DiffEqBase\src\diffeqfunction.jl:144 [inlined]
   [5] perform_step! at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\perform_step\low_order.jl:23 [inlined]
   [6] macro expansion at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\integrators\integrator_utils.jl:67 [inlined]
   [7] solve!(::StochasticDiffEq.SDEIntegrator{EM{true},Array{Float64,1},Float64,Float64,Nothing,Float64,Float64,Float64,NoiseProcess{Float64,2,Float64,Array{Float64,1},Nothing,Nothing,typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Nothing}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Nothing}},RSWM{:RSwM1,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},Array{Float64,1},RODESolution{Float64,2,Array{Array{Float64,1},1},Array{Array{Float64,1},1},Dict{Symbol,Float64},Array{Float64,1},NoiseProcess{Float64,2,Float64,Array{Float64,1},Nothing,Nothing,typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Nothing}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Nothing}},RSWM{:RSwM1,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),Nothing,Nothing},EM{true},StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}},StochasticDiffEq.EMCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}},SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),StochasticDiffEq.SDEOptions{Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Float64,Float64,Float64,Float64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Nothing}) at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\solve.jl:385
   [8] #__solve#37(::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:dt,),Tuple{Float64}}}, ::Function, ::SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),Nothing,Nothing}, ::EM{true}, ::Array{Any,1}, ::Any, ::Array{Any,1}, ::Type{Val{true}}) at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\solve.jl:7
   [9] (::getfield(DiffEqBase, Symbol("#kw##__solve")))(::NamedTuple{(:dt,),Tuple{Float64}}, ::typeof(DiffEqBase.__solve), ::SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),Nothing,Nothing}, ::EM{true}) at .\none:0
   [10] #solve#424(::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:dt,),Tuple{Float64}}}, ::Function, ::SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),Nothing,Nothing}, ::EM{true}) at C:\Users\MSeeker\.julia\dev\DiffEqBase\src\solve.jl:19
   [11] (::getfield(DiffEqBase, Symbol("#kw##solve")))(::NamedTuple{(:dt,),Tuple{Float64}}, ::typeof(solve), ::SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SplitSDEFunction{true,SDEFunction{true,getfield(Main, Symbol("##21#22")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},SDEFunction{true,getfield(Main, Symbol("##23#24")),getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##25#26")),LinearAlgebra.UniformScaling{Bool},Nothing,typeof(ff1_analytic)},getfield(Main, Symbol("##25#26")),Nothing,Nothing}, ::EM{true}) at .\none:0
   [12] top-level scope at none:0
   [13] include at .\boot.jl:317 [inlined]
   [14] include_relative(::Module, ::String) at .\loading.jl:1034
   [15] include(::Module, ::String) at .\sysimg.jl:29
   [16] include(::String) at .\client.jl:393
   [17] macro expansion at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\runtests.jl:162 [inlined]
   [18] macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Test\src\Test.jl:1080 [inlined]
   [19] macro expansion at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\runtests.jl:51 [inlined]
   [20] macro expansion at .\util.jl:156 [inlined]
   [21] macro expansion at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\runtests.jl:51 [inlined]
   [22] top-level scope at .\util.jl:156 [inlined]
   [23] top-level scope at .\<missing>:0
   [24] include at .\boot.jl:317 [inlined]
   [25] include_relative(::Module, ::String) at .\loading.jl:1034
   [26] include(::Module, ::String) at .\sysimg.jl:29
   [27] include(::String) at .\client.jl:393
   [28] top-level scope at none:0
   [29] eval(::Module, ::Any) at .\boot.jl:319
   [30] exec_options(::Base.JLOptions) at .\client.jl:243
   [31] _start() at .\client.jl:427
  in expression starting at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\split_tests.jl:97
Test Summary: | Pass  Error  Total
Split Tests   |    5      1      6
ERROR: LoadError: Some tests did not pass: 5 passed, 0 failed, 1 errored, 0 broken.
in expression starting at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\test\runtests.jl:17

@MSeeker1340
Copy link
Contributor Author

Also about SKenCarp: I'm getting errors when using non-scalar g function both here and on master. For example, this test script:

using StochasticDiffEq

println("Scalar g")
A = [-1.0 0.0; 0.0 -0.5]
u0 = [1.0, 1.0]; tspan = (0.0,1.0)
_f = (u,p,t) -> t*(A*u)
_g = (u,p,t) -> 1.0
prob = SDEProblem(SDEFunction(_f, _g), _g, u0, tspan)
integrator = init(prob, SKenCarp(); adaptive=false, dt=0.01)
step!(integrator) # fine

println("Vector g")
_g = (u,p,t) -> [1.0, 1.0]
prob = SDEProblem(SDEFunction(_f, _g), _g, u0, tspan)
println("Implicit EM")
integrator = init(prob, ImplicitEM(); adaptive=false, dt=0.01)
step!(integrator) # fine
println("SKenCarp")
integrator = init(prob, SKenCarp(); adaptive=false, dt=0.01)
step!(integrator) # error

Gives the following output:

Scalar g
Vector g
Implicit EM
SKenCarp
ERROR: LoadError: DimensionMismatch("Cannot multiply two vectors")
Stacktrace:
 [1] * at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\LinearAlgebra\src\deprecated.jl:561 [inlined]
 [2] muladd at .\math.jl:1014 [inlined]
 [3] perform_step!(::StochasticDiffEq.SDEIntegrator{SKenCarp{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType,Nothing,Nothing,Float64,:Predictive},Array{Float64,1},Float64,Float64,Nothing,Float64,Float64,Float64,DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.WHITE_NOISE_BRIDGE),false,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},Array{Float64,1},RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.WHITE_NOISE_BRIDGE),false,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,Nothing,SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##7#8")),Nothing,Nothing},SKenCarp{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType,Nothing,Nothing,Float64,:Predictive},StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}},StochasticDiffEq.SKenCarpConstantCache{DiffEqDiffTools.UDerivativeWrapper{SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},Float64,StochasticDiffEq.SKenCarpTableau{Float64,Float64}},SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##7#8")),StochasticDiffEq.SDEOptions{Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Float64,Float64,Float64,Float64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Nothing}, ::StochasticDiffEq.SKenCarpConstantCache{DiffEqDiffTools.UDerivativeWrapper{SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},Float64,StochasticDiffEq.SKenCarpTableau{Float64,Float64}}, ::SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}) at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\perform_step\kencarp.jl:29
 [4] perform_step! at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\perform_step\kencarp.jl:3 [inlined]
 [5] step!(::StochasticDiffEq.SDEIntegrator{SKenCarp{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType,Nothing,Nothing,Float64,:Predictive},Array{Float64,1},Float64,Float64,Nothing,Float64,Float64,Float64,DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.WHITE_NOISE_BRIDGE),false,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},Array{Float64,1},RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.WHITE_NOISE_BRIDGE),false,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},false,Nothing,Nothing,SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##7#8")),Nothing,Nothing},SKenCarp{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType,Nothing,Nothing,Float64,:Predictive},StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}},StochasticDiffEq.SKenCarpConstantCache{DiffEqDiffTools.UDerivativeWrapper{SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},Float64,StochasticDiffEq.SKenCarpTableau{Float64,Float64}},SDEFunction{false,getfield(Main, Symbol("##3#4")),getfield(Main, Symbol("##7#8")),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},getfield(Main, Symbol("##7#8")),StochasticDiffEq.SDEOptions{Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Float64,Float64,Float64,Float64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Nothing}) at C:\Users\MSeeker\.julia\dev\StochasticDiffEq\src\iterator_interface.jl:11
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1034
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] include(::String) at .\client.jl:393
 [11] top-level scope at none:0
in expression starting at C:\Users\MSeeker\Desktop\JSoC\skencarp.jl:20

@ChrisRackauckas Can you confirm these errors indeed exist and are not a result of my environment/configuration?

@ChrisRackauckas
Copy link
Member

For the integration, I figured the simplest solution is to reset the random seed every time solve is called, in a sense enforcing deterministic solution which can then be compared.

That only holds for some regression testing due to the fact that adaptivity can make the same seed on different problems generate a different time-sequence of random numbers

@ChrisRackauckas
Copy link
Member

Those two issues were issues on master and the fixes were merged into the PR

@ChrisRackauckas ChrisRackauckas merged commit 3819478 into SciML:master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants