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

Add MethodOfLines Benchmark

Open xtalax opened this issue 2 years ago • 6 comments

Adds a benchmark for MethodOfLines.jl, using Burgers Equation.

xtalax avatar May 24 '22 16:05 xtalax

You should extend https://benchmarks.sciml.ai/html/MOLPDE/burgers_fdm_wpd.html to show the performance difference against the other formulation as well.

ChrisRackauckas avatar May 25 '22 13:05 ChrisRackauckas

@staticfloat or @anandijain , the hash thing is back?

ChrisRackauckas avatar May 26 '22 18:05 ChrisRackauckas

I fixed a couple problems in https://github.com/SciML/SciMLBenchmarks.jl/pull/426, merge that then rebase this on top of master.

staticfloat avatar May 26 '22 19:05 staticfloat

Let's get this updated. See https://benchmarks.sciml.ai/dev/StiffODE/Bruss/. We can now have multiple problems and allow for a :prob_choice in the benchmark. It would be interesting to update this to be alternative prob choices on the FDM ones and see how MOL.jl performs against the hand-written discretizations.

ChrisRackauckas avatar Sep 27 '22 07:09 ChrisRackauckas

I already have the working bruss code, let me see how to integrate this.

Should I also benchmark discretization time?

xtalax avatar Sep 28 '22 14:09 xtalax

I expect WorkPrecisionSet will need special handling for pdesol, I'm just passing the original_sol at the moment. I will duplicate all the MTKitize algs as that's the most equivalent

xtalax avatar Sep 28 '22 14:09 xtalax

@ChrisRackauckas how is bruss looking now? And will unused prob kwargs be passed down to the solve, or do I need to do something special? Need to avoid wrapping.

xtalax avatar Oct 05 '22 13:10 xtalax

Add it as a 4th version in Bruss. Don't delete the fastprob one.

ChrisRackauckas avatar Oct 06 '22 05:10 ChrisRackauckas

@ChrisRackauckas it isn't deleted, it is a 4th prob and 4th test_sol. You may have been looking at burgers, which i have rolled back as its awaiting SplitODESystem.

xtalax avatar Oct 06 '22 13:10 xtalax

But you didn't add it to the wp setups

ChrisRackauckas avatar Oct 06 '22 13:10 ChrisRackauckas

@ChrisRackauckas looking at the wp setups, (1) I notice that fastbruss is not included everywhere, does this need fixing? Else, should I not include MOL in setups where fastbruss is omitted?

(2) In addition in 2 of the setups only the mtk prob is used - is this correct?

(3) Finally in the last wp setup, the name specifies that the final problem in the set is MTK, but there is no :prob_choice = 2 for this setup. Is this correct?

xtalax avatar Oct 06 '22 13:10 xtalax

Most of the different problem checking is done in just the single test. That is because that's for problem formulation, while the other tests of solvers. However, there is the confounding fact that GMRES benefits a lot less from having a fast symbolic Jacobian definition than the others (because it doesn't use it), and so the balance between solvers can be dependent on the problem formulation. For that reason, there's some cases where the modelingtoolkit version is included in the solver tests to showcase this effect, and notably that uses jac=true, sparse=true, and that's why you see a major difference with that included (specifically with the KLU version).

ChrisRackauckas avatar Oct 07 '22 05:10 ChrisRackauckas

Failures look like typos

ChrisRackauckas avatar Oct 07 '22 06:10 ChrisRackauckas

Looks like the fails were caused by MethodOfLines not being in the manifest, I have run Pkg.resolve()

The benchmarks are running on 1.7, shouldn't this be updated to 1.8?

xtalax avatar Oct 07 '22 15:10 xtalax

Rebase for v1.8

ChrisRackauckas avatar Oct 09 '22 18:10 ChrisRackauckas

Rebased

xtalax avatar Oct 10 '22 11:10 xtalax

need to update the manifest

ChrisRackauckas avatar Oct 10 '22 14:10 ChrisRackauckas

In the manifest:

julia_version = "1.8.1"

ChrisRackauckas avatar Oct 10 '22 14:10 ChrisRackauckas

You mean this should be 1.8.2, or omitted? There are examples of both styles across the package

xtalax avatar Oct 10 '22 17:10 xtalax

it should be v1.8.2 to match the CI machine. I think that's why it's greyed out and I cannot unblock the runs.

ChrisRackauckas avatar Oct 10 '22 18:10 ChrisRackauckas

There's failures in a good chunk of these.

ChrisRackauckas avatar Oct 12 '22 21:10 ChrisRackauckas

Does WPSet pass down kwargs to the solve? Need to set wrap=Val(false)

xtalax avatar Oct 13 '22 17:10 xtalax

It does. If it's a problem-specific thing, then the setup will too.

ChrisRackauckas avatar Oct 13 '22 17:10 ChrisRackauckas

Builds failed.

ChrisRackauckas avatar Nov 09 '22 20:11 ChrisRackauckas

@xtalax status here?

ChrisRackauckas avatar Nov 23 '22 23:11 ChrisRackauckas

Status is that I can't work out why this is still failing, could copy out the code and project and try to run manually to debug

xtalax avatar Nov 28 '22 14:11 xtalax

@ChrisRackauckas this should be done now

xtalax avatar Dec 07 '22 16:12 xtalax

Okay let's continue the MethodOfLinesPDE set in a later PR

ChrisRackauckas avatar Dec 10 '22 07:12 ChrisRackauckas