SciML / SciMLExpectations.jl

Fast uncertainty quantification for scientific machine learning (SciML) and differential equations
https://docs.sciml.ai/SciMLExpectations/stable/
Other
65 stars 20 forks source link

Potential issue with uncertainty quantification #57

Open S-Math opened 2 years ago

S-Math commented 2 years ago

I mentionned an issue I had using the library to assess the uncertainty of my DAE system solution on the forum :

https://discourse.julialang.org/t/problem-understanding-results-of-diffequncertainty/71193

I was encouraged to post an issue about it even though my code might be the problem and not the library.

The problem is basically that solving my DAE normally takes 9s

9.159245 seconds (21.20 M allocations: 1.964 GiB, 9.29% gc time, 0.10% compilation time)

whereas if I use the uncertainty library it takes way longer (for 5 trajectories) and a lot of allocations :

6588.658787 seconds (21.72 G allocations: 3.086 TiB, 52.83% gc time, 0.00% compilation time)

I am not pasting the whole discussion on the forum, to not clutter this post but the issue might be related to caching according to Chris Rackauckas

The code :

I add my code to this issue. The file interp2D.jl is used to defined interpolation functions on my main code _model_MMgithub.jl

I scraped the code as best as I coould, I believe it is fairly straightforward, if somehow something is not clear, do not hesitate to ask for more information.

code_github.zip

ChrisRackauckas commented 2 years ago

Yeah this library isn't quite stable because of its setup. It needs a bit of work which will happen over the next year.

S-Math commented 2 years ago

Ok, thank you for taking the time to reply.

ChrisRackauckas commented 2 years ago

I'll keep this open to track it with the performance changes.