-
-
Notifications
You must be signed in to change notification settings - Fork 16
SciMLOperators operator evaluation interface allowing different defining and action vectors #269
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
Conversation
vpuri3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisRackauckas thoughts?
|
This doesn't touch the main issue yet? Take for example: That instead should be We should use that as the standard syntax: Call form should be |
|
Thanks for the review @ChrisRackauckas I did find the function signatures in an issue discussion on this package, and also have implemented around that routine, but just to be sure with the operator evaluation interface, went ahead and opened a [WIP] PR. |
…tor application and evaluation interfaces, tests
|
Massive update to operator interfaces, with the addition of new interfaces. Relevant Docstrings have been updated with correct code examples, I have utilised examples where we can assume both state and action vectors are the same, by simply passing the same vector twice. All docstrings are correct and execute to the best of my knowledge. Core documentation in the docs is still left untouched, a review of this commit can help me navigate it further. NOTE : legacy runtests.jl file doesn't work, it will be modified when this PR is ready for a merge. Caveats :
I wanted to discuss a bit about these caveats, before proceeding to finalise the interface, but they are in tests and their tests have been commented out. (only a few of them - 2 or 3) Queries :
|
|
I sort of have put too much comments as I was understanding the application of each function, they will be removed as we finalise stuff. @ChrisRackauckas Another review perhaps :) |
|
This looks really good! I think the only thing I was seeing was some unnecessary conversions for the adjoint operator. The rest looks fine? |
|
@avik-pal can you check this matches your expectations with SciMLJacobianOperator? If I could add one thing, I would like to see https://github.com/SciML/NonlinearSolve.jl/blob/master/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl just be an extension here rather than a piece in NonlinearSolve. |
|
Calling in @oscardssmith to check as well, since I think he complained about this with WOperator before. I believe with this change to the interface both the JacobianOperator and WOperator are now AbstractSciMLOperators, with JacobianOperator just being a FunctionOperator with the right functions defined. |
|
Thank you so much for the comprehensive review Dr. Chris, I added reshaping for absolute certainity. but if it's going to be an overhead I will certainly remove them. I hope people wont refer to this package's version 1 as the most broken package in the ecosystem, so much good stuff here. |
|
I think this fixes so much that people will be very happy with this!
Makes sense, that's expected?
What do you mean by this?
I'm not sure what you mean here. |
Dimension mismatch errors expected, in the interface I consulted with @vpuri3 and they mentioned to include dimension checking in the core interface for operators, from which it follows and appears that it is expected. Some operators (by some most certainly 2), allocate memory, I witnessed in the original tests there were conditions that were checking zero memory allocations, which I believe is not currently the case, as those tests were failing, I had a hard time optimizing those. Another assertion that @vpuri3 recommended in the core interface was checking if the processing is on GPU/CPU. |
I see. I wouldn't mix that into this PR though since it needs to setup separate CI resources (BuildKite). By eye it should all work though.
Sounds good |
|
The tests are... weird though. Why did you make every test have a folder with old and new? Just update the test files in place. It'll make an easier diff to read. That part will not need very many changes and the change log should show that not much changed in the tests other than showing a few new calls, and new function signatures in the FunctionOperator part.
Which ones? I don't see |
|
So for tests, I separated each of the original file into an original_new and original_modified part, I was going to merge all the tests in one place, after this review, I sort of wanted to get a review beforehand :) They are in the tests/basic/basic_modified.jl file. |
|
Looks good. I can take a look again after you fix the |
|
Allocation tests are fine. |
(@v1.10) pkg> test SciMLOperators
Testing SciMLOperators
Status `C:\Users\accou\AppData\Local\Temp\jl_6tldPs\Project.toml`
[7a1cc6ca] FFTW v1.8.1
[1bc83da4] SafeTestsets v0.1.0
[c0aeaf25] SciMLOperators v0.4.0 `C:\Users\accou\.julia\dev\SciMLOperators`
[e88e6eb3] Zygote v0.7.7
[37e2e46d] LinearAlgebra
[9a3f8284] Random
[2f01184e] SparseArrays v1.10.0
[8dfed614] Test
Status `C:\Users\accou\AppData\Local\Temp\jl_6tldPs\Manifest.toml`
[621f4979] AbstractFFTs v1.5.0
[7d9f7c33] Accessors v0.1.42
[79e6a3ab] Adapt v4.3.0
[4fba245c] ArrayInterface v7.19.0
[082447d4] ChainRules v1.72.3
[d360d2e6] ChainRulesCore v1.25.1
[bbf7d656] CommonSubexpressions v0.3.1
[34da2185] Compat v4.16.0
[a33af91c] CompositionsBase v0.1.2
[187b0558] ConstructionBase v1.5.8
[9a962f9c] DataAPI v1.16.0
[e2d170a0] DataValueInterfaces v1.0.0
[163ba53b] DiffResults v1.1.0
[b552c78f] DiffRules v1.15.1
[ffbed154] DocStringExtensions v0.9.4
[7a1cc6ca] FFTW v1.8.1
[1a297f60] FillArrays v1.13.0
⌃ [f6369f11] ForwardDiff v0.10.38
[46192b85] GPUArraysCore v0.2.0
[7869d1d1] IRTools v0.4.14
[3587e190] InverseFunctions v0.1.17
[92d709cd] IrrationalConstants v0.2.4
[82899510] IteratorInterfaceExtensions v1.0.0
[692b3bcd] JLLWrappers v1.7.0
[2ab3a3ac] LogExpFunctions v0.3.29
[1914dd2f] MacroTools v0.5.16
[77ba4419] NaNMath v1.1.3
[bac558e1] OrderedCollections v1.8.0
⌅ [aea7be01] PrecompileTools v1.2.1
[21216c6a] Preferences v1.4.3
[c1ae055f] RealDot v0.1.0
[189a3867] Reexport v1.2.2
[ae029012] Requires v1.3.1
[1bc83da4] SafeTestsets v0.1.0
[c0aeaf25] SciMLOperators v0.4.0 `C:\Users\accou\.julia\dev\SciMLOperators`
[dc90abb0] SparseInverseSubset v0.1.2
[276daf66] SpecialFunctions v2.5.1
[1e83bf80] StaticArraysCore v1.4.3
[09ab397b] StructArrays v0.7.1
[3783bdb8] TableTraits v1.0.1
[bd369af6] Tables v1.12.0
[e88e6eb3] Zygote v0.7.7
[700de1a5] ZygoteRules v0.2.7
[f5851436] FFTW_jll v3.3.11+0
[1d5cc7b8] IntelOpenMP_jll v2025.0.4+0
[856f044c] MKL_jll v2025.0.1+1
[efe28fd5] OpenSpecFun_jll v0.5.6+0
[1317d2d5] oneTBB_jll v2022.0.0+0
[0dad84c5] ArgTools v1.1.1
[56f22d72] Artifacts
[2a0f44e3] Base64
[ade2ca70] Dates
[8ba89e20] Distributed
[f43a241f] Downloads v1.6.0
[7b1f6079] FileWatching
[b77e0a4c] InteractiveUtils
[4af54fe1] LazyArtifacts
[b27032c2] LibCURL v0.6.4
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[ca575930] NetworkOptions v1.2.0
[44cfe95a] Pkg v1.10.0
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization
[6462fe0b] Sockets
[2f01184e] SparseArrays v1.10.0
[10745b16] Statistics v1.10.0
[4607b0f0] SuiteSparse
[fa267f1f] TOML v1.0.3
[a4e569a6] Tar v1.10.0
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
[e66e0078] CompilerSupportLibraries_jll v1.1.1+0
[deac9b47] LibCURL_jll v8.4.0+0
[e37daf67] LibGit2_jll v1.6.4+0
[29816b5a] LibSSH2_jll v1.11.0+1
[c8ffd9c3] MbedTLS_jll v2.28.2+1
[14a3606d] MozillaCACerts_jll v2023.1.10
[4536629a] OpenBLAS_jll v0.3.23+4
[05823500] OpenLibm_jll v0.8.1+4
[bea87d4a] SuiteSparse_jll v7.2.1+1
[83775a58] Zlib_jll v1.2.13+1
[8e850b90] libblastrampoline_jll v5.11.0+0
[8e850ede] nghttp2_jll v1.52.0+1
[3f19e933] p7zip_jll v17.4.0+2
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading.
Precompiling packages finished.
3 dependencies successfully precompiled in 5 seconds. 80 already precompiled.
Testing Running tests...
6.711087 seconds (8.05 M allocations: 540.353 MiB, 2.40% gc time, 97.57% compilation time)
25.260978 seconds (34.67 M allocations: 2.306 GiB, 3.20% gc time, 98.33% compilation time)
TensorProductOperator: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:513
Test threw exception
Expression: AB \ v2 ≈ opAB \ v2
DimensionMismatch: arguments must have the same number of rows
Stacktrace:
[1] ldiv(F::LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:537
[2] \
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:529 [inlined]
[3] \(A::Matrix{Float64}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1126
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:513 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:429
TensorProductOperator: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:514
Test threw exception
Expression: AB \ v2 ≈ opAB_F \ v2
DimensionMismatch: arguments must have the same number of rows
Stacktrace:
[1] ldiv(F::LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:537
[2] \
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:529 [inlined]
[3] \(A::Matrix{Float64}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1126
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:514 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:429
TensorProductOperator: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:515
Test threw exception
Expression: ABC \ v3 ≈ opABC \ v3
DimensionMismatch: arguments must have the same number of rows
Stacktrace:
[1] ldiv(F::LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:537
[2] \
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:529 [inlined]
[3] \(A::Matrix{Float64}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1126
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:515 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:429
TensorProductOperator: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:516
Test threw exception
Expression: ABC \ v3 ≈ opABC_F \ v3
DimensionMismatch: arguments must have the same number of rows
Stacktrace:
[1] ldiv(F::LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:537
[2] \
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\LinearAlgebra.jl:529 [inlined]
[3] \(A::Matrix{Float64}, B::Matrix{Float64})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1126
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:516 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\matrix.jl:429
22.047475 seconds (16.19 M allocations: 1.048 GiB, 1.35% gc time, 96.83% compilation time)
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:50
Test threw exception
Expression: _mul(A, v) ≈ L(v, u, p, t) ≈ L * v ≈ mul!(zero(w), L, v)
MethodError: no method matching *(::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, ::Array{Float64, 3})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
@ Base operators.jl:587
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.IdentityOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:100
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.NullOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:197
...
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:50 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Test Failed at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:51
Expression: α * _mul(A, u) + β * v ≈ mul!(copy(v), L, u, α, β)
Evaluated: [6.856029684327335 6.839936269195246 6.164111131484595 6.084032379962711; 6.856846389811402 6.747746371478654 7.175105302689519 7.336270766460312; 6.709682359402347 6.645665913760675 7.328038399149491 7.051232491956525;;; 6.084636585066501 6.550282540438302 6.835036996084225 6.6665668190931395; 7.29035000176829 6.178719404633673 6.4418883616046045 5.767401724218631; 6.200323578295962 6.530557574339317 6.228727501541552 6.244650842999983;;; 6.168426449070869 7.97746546784697 5.810105769775957 6.853607526432365; 7.1263719242420756 6.469369425746792 5.922468914891569 6.747019832122741; 6.803804326815569 6.322627491429793 7.145472416222497 7.135935726639391;;; 6.297927411882491 7.504306027511848 7.262359746709918 6.9581998866249375; 6.39495022079236 7.072423308527754 7.070607402625998 7.016536635701592; 6.662834133875862 7.401360403819922 7.003242618398414 7.2095185732657905;;; 6.301958346990775 7.5132390990469595 6.441401783534827 6.1240242786644234; 7.192294265197714 7.062273031668929 6.6524790350467295 6.431232358841513; 5.702944233842017 6.150268258282226 6.926230289334366 6.70180634436413] ≈ [0.3213590887625024 0.265380253142738 0.20209499442149875 0.12235476659803825; 0.3061924923520153 0.2691606523405194 0.29497895676695435 0.3880701172357065; 0.30068870754746163 0.16291132219552576 0.30809274600121417 0.42413457704106805;;; 0.43989747835856496 0.0880129888870573 0.06277811361410907 0.06712915391312525; 0.14617979129253356 0.18392250652871459 0.23635137054924246 0.021227580316261107; 0.3880027991373398 0.0021539194417807004 0.2618266401940937 0.33449703327393204;;; 0.2481308203801853 0.15708733602733657 0.12693122242653587 0.0008411494230434727; 0.1099447927676937 0.12175058548069158 0.10771330822020977 0.2734205491953288; 0.3502503061960965 0.223681274811141 0.10309638936163364 0.4391793146276148;;; 0.47320796107450613 0.43554684684578376 0.1151228470621826 0.2854003007235895; 0.1856999448962573 0.14259574128108604 0.4041852568904389 0.1573964855619642; 0.048731072017471865 0.4556890040041235 0.263979238649574 0.22006809731593266;;; 0.15190714354265342 0.42841256270593764 0.39727491684179866 0.1095288936608719; 0.4481310509478318 0.18362791531668302 0.2762599520927609 0.2784798632094634; 0.3893236716153453 0.15609480401183728 0.07030591128997145 0.3980357008702094]
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:672 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:51 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Test Failed at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:55
Expression: _mul(A, action_vec) ≈ L(action_vec, u, p, t)
Evaluated: [16.225111792725748 15.761886226385935 13.046960056695164 13.959211696649149; 15.83817951871293 15.219015694303465 15.65271286915015 16.339579026300424; 14.680326667409298 15.616844339739764 16.888233342241975 15.676051408873366;;; 15.605293929138353 15.04440429596742 16.188707185669674 15.322334996024853; 16.332548145298897 12.83001005142302 14.45966078950564 12.799392013502846; 13.70794853469649 12.86457018756447 13.89792871404683 13.808544330452952;;; 14.370916338186518 18.231498445577618 13.854730904673389 15.89643729258593; 15.262579492622782 16.15586850986692 13.665209490299208 14.788211951349378; 16.712465354379173 14.373340199236294 16.30642090662503 16.26944783110744;;; 12.24949344797648 16.47731947691479 16.04399668207848 15.963438958839246; 14.221544877941767 15.785688223313585 15.991117162468125 14.7175234869951; 15.169623855698493 17.884007359691235 15.409979033645236 15.552178960145378;;; 14.873939261484132 16.92957266164886 13.274720956765726 14.935392405826702; 14.808804936425894 14.882172794207827 14.794180825768137 15.776088768942854; 14.254525758417348 13.667097726356914 16.029314965407682 15.618481886612651] ≈ [1.069042016904e-311 1.069042508887e-311 1.069042183665e-311 1.069042183179e-311; 1.0690423142764e-311 1.069042392667e-311 1.0690420472517e-311 1.0690420494967e-311; 1.06904215148e-311 1.069042047228e-311 1.069042278822e-311 1.0690420486193e-311;;; 1.069041925988e-311 1.0690421343653e-311 1.069042278162e-311 1.069041915079e-311; 1.069042400884e-311 1.0690418977474e-311 1.069042363019e-311 1.069042182752e-311; 1.0690422100404e-311 1.0690420478525e-311 1.0690420114734e-311 1.069041912083e-311;;; 1.0690419798374e-311 1.069041895941e-311 6.95237531082434e-310 6.9523821171106e-310; 1.0690424280814e-311 0.0 0.0 0.0; 1.0690419119963e-311 6.9523821171106e-310 6.9523821171106e-310 6.9523821171106e-310;;; 6.9523758314652e-310 6.95239945514684e-310 1.069041932506e-311 1.0690421122154e-311; 0.0 1.0690418966447e-311 1.0690420685637e-311 1.0690419327865e-311; 6.9523755591528e-310 1.0690419720233e-311 1.069042067473e-311 1.069041994458e-311;;; 1.069042102097e-311 1.069042070433e-311 1.0690419014984e-311 1.0690419776477e-311; 1.069042106753e-311 1.069042147476e-311 1.0690419621617e-311 1.069041962118e-311; 1.0690419789323e-311 1.0690421123814e-311 1.069041897435e-311 1.0690420701487e-311]
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:672 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:55 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:58
Test threw exception
Expression: _div(A, v) ≈ L \ v ≈ ldiv!(zero(u), L, v) ≈ ldiv!(L, copy(v))
adjoint not defined for Array{Float64, 3}. Consider using `permutedims` for higher-dimensional arrays.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] adjoint(a::Array{Float64, 3})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\transpose.jl:3
[3] \(x::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, y::Array{Float64, 3})
@ Base .\operators.jl:625
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:58 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:62
Test threw exception
Expression: vec(_mul(A, u)) ≈ L(vec(u), u, p, t) ≈ L * vec(u) ≈ mul!(vec(zero(w)), L, vec(u))
MethodError: no method matching *(::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, ::Vector{Float64})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
@ Base operators.jl:587
*(::SciMLOperators.IdentityOperator, ::AbstractVecOrMat)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:41
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.IdentityOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:100
...
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:62 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Test Failed at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:63
Expression: vec(α * _mul(A, u) + β * v) ≈ mul!(vec(copy(v)), L, vec(u), α, β)
Evaluated: [6.856029684327335, 6.856846389811402, 6.709682359402347, 6.839936269195246, 6.747746371478654, 6.645665913760675, 6.164111131484595, 7.175105302689519, 7.328038399149491, 6.084032379962711 … 5.702944233842017, 7.5132390990469595, 7.062273031668929, 6.150268258282226, 6.441401783534827, 6.6524790350467295, 6.926230289334366, 6.1240242786644234, 6.431232358841513, 6.70180634436413] ≈ [0.3213590887625024, 0.3061924923520153, 0.30068870754746163, 0.265380253142738, 0.2691606523405194, 0.16291132219552576, 0.20209499442149875, 0.29497895676695435, 0.30809274600121417, 0.12235476659803825 … 0.3893236716153453, 0.42841256270593764, 0.18362791531668302, 0.15609480401183728, 0.39727491684179866, 0.2762599520927609, 0.07030591128997145, 0.1095288936608719, 0.2784798632094634, 0.3980357008702094]
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:672 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:63 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:66
Test threw exception
Expression: vec(_div(A, v)) ≈ L \ vec(v) ≈ ldiv!(vec(zero(u)), L, vec(v)) ≈ ldiv!(L, vec(copy(v)))
StackOverflowError:
Stacktrace:
[1] \(x::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, y::Vector{Float64})
@ Base .\operators.jl:625
[2] /(u::LinearAlgebra.Adjoint{Float64, Vector{Float64}}, L::SciMLOperators.AdjointOperator{Float64, SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}})
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\left.jl:130
--- the last 2 lines are repeated 39990 more times ---
[79983] \(x::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Main.var"##Function Operator#228".var"#fi#4"{Matrix{Float64}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}}, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, y::Vector{Float64})
@ Base .\operators.jl:625
(Unbatched) FunctionOperator ND array: Test Failed at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:73
Expression: output_vec ≈ _mul(A, action_vec)
Evaluated: [0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0;;; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0;;; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0;;; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0;;; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0] ≈ [16.225111792725748 15.761886226385935 13.046960056695164 13.959211696649149; 15.83817951871293 15.219015694303465 15.65271286915015 16.339579026300424; 14.680326667409298 15.616844339739764 16.888233342241975 15.676051408873366;;; 15.605293929138353 15.04440429596742 16.188707185669674 15.322334996024853; 16.332548145298897 12.83001005142302 14.45966078950564 12.799392013502846; 13.70794853469649 12.86457018756447 13.89792871404683 13.808544330452952;;; 14.370916338186518 18.231498445577618 13.854730904673389 15.89643729258593; 15.262579492622782 16.15586850986692 13.665209490299208 14.788211951349378; 16.712465354379173 14.373340199236294 16.30642090662503 16.26944783110744;;; 12.24949344797648 16.47731947691479 16.04399668207848 15.963438958839246; 14.221544877941767 15.785688223313585 15.991117162468125 14.7175234869951; 15.169623855698493 17.884007359691235 15.409979033645236 15.552178960145378;;; 14.873939261484132 16.92957266164886 13.274720956765726 14.935392405826702; 14.808804936425894 14.882172794207827 14.794180825768137 15.776088768942854; 14.254525758417348 13.667097726356914 16.029314965407682 15.618481886612651]
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:672 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:73 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Test Failed at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:79
Expression: output_vec ≈ α * _mul(A, action_vec) + β * orig_output
Evaluated: [0.24521541490041984 0.09103430971320164 0.3952920801293347 0.32504717087866225; 0.44996321343510204 0.4065501833938881 0.3233062432032002 0.35997954121005055; 0.4064880168533949 0.25823592088298414 0.28600299506991184 0.44061985247185476;;; 0.2099996404311158 0.17350883279177268 0.10079225611792028 0.22966984431679976; 0.41713321054506564 0.11615357732521936 0.11175727758562869 0.2494238987325568; 0.03154227531379667 0.29680665497634406 0.381710683755079 0.3358505146135576;;; 0.288738288721201 0.3762223455123231 0.37186079027134245 0.47315610841760114; 0.20379318281541792 0.29598718996224704 0.4378966984419711 0.3908643322303749; 0.07802755246260049 0.059038544944814655 0.19322161218625056 0.36204783985320443;;; 0.26887082744263074 0.4560412016512276 0.4317146290287872 0.12997062989986016; 0.19846874534032055 0.2854589724127082 0.10781771230132357 0.4113871308700747; 0.1422527065175807 0.4160997981260423 0.3107933737298456 0.10048625992437185;;; 0.3852108976279437 0.17942420115244312 0.42003876234463855 0.008144554450681341; 0.18402182941021436 0.22141731427390637 0.10602748454037936 0.2386334626547128; 0.44281827321149303 0.20578567011960824 0.0002042190678951927 0.46269682658530104] ≈ [6.617961883103339 6.407746696106936 5.350278983224325 5.710226027288573; 6.490577224352461 6.233108014636851 6.397026929080026 6.6809888011031875; 6.014553176107286 6.373070039530731 6.8928852449175375 6.423451477917324;;; 6.361412133866513 6.128585247512244 6.582318114299691 6.249458909715031; 6.686397176076333 5.221916737895513 5.882429753655027 5.22875746138632; 5.565866482224306 5.262048756785107 5.6935535077769295 5.650661835611692;;; 5.8720064184750616 7.450887188930665 5.674604508802299 6.517564595641141; 6.2214760077374365 6.5972083019663375 5.607260379954107 6.0560639837443935; 6.791516192305758 5.839789747055537 6.6434339377310705 6.652835557269287;;; 5.0084746981597945 6.750754459252424 6.571439549445038 6.4951442581495575; 5.7983592390462855 6.445504642323451 6.503171382307029 6.03035200764072; 6.174869100980157 7.315673992500832 6.296741372261897 6.3240347223331215;;; 6.090026379630938 6.894252043514621 5.446258262321211 6.060457983192631; 6.034522225274953 6.069692544317332 6.01731619030016 6.434842146634198; 5.847057026028193 5.574477886777746 6.5031141173667155 6.403286484990026]
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:672 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:79 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:50
Test threw exception
Expression: _mul(A, v) ≈ L(v, u, p, t) ≈ L * v ≈ mul!(zero(w), L, v)
MethodError: no method matching *(::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Nothing, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, ::Array{Float64, 3})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
@ Base operators.jl:587
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.IdentityOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:100
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.NullOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:197
...
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:50 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:51
Test threw exception
Expression: α * _mul(A, u) + β * v ≈ mul!(copy(v), L, u, α, β)
DimensionMismatch: dimensions must match: a has dims (Base.OneTo(4), Base.OneTo(5), Base.OneTo(6)), b has dims (Base.OneTo(3), Base.OneTo(4), Base.OneTo(5)), mismatch at 1
Stacktrace:
[1] promote_shape
@ .\indices.jl:178 [inlined]
[2] promote_shape(a::Array{Float64, 3}, b::Array{Float64, 3})
@ Base .\indices.jl:169
[3] +(A::Array{Float64, 3}, Bs::Array{Float64, 3})
@ Base .\arraymath.jl:14
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:51 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:55
Test threw exception
Expression: _mul(A, action_vec) ≈ L(action_vec, u, p, t)
DimensionMismatch: dimensions must match: a has dims (Base.OneTo(4), Base.OneTo(5), Base.OneTo(6)), b has dims (Base.OneTo(3), Base.OneTo(4), Base.OneTo(5)), mismatch at 1
Stacktrace:
[1] promote_shape
@ .\indices.jl:178 [inlined]
[2] promote_shape(a::Array{Float64, 3}, b::Array{Float64, 3})
@ Base .\indices.jl:169
[3] -(A::Array{Float64, 3}, B::Array{Float64, 3})
@ Base .\arraymath.jl:7
[4] isapprox(x::Array{Float64, 3}, y::Array{Float64, 3}; atol::Int64, rtol::Float64, nans::Bool, norm::typeof(LinearAlgebra.norm))
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1789
[5] isapprox(x::Array{Float64, 3}, y::Array{Float64, 3})
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\generic.jl:1785
[6] eval_test(evaluated::Expr, quoted::Expr, source::LineNumberNode, negate::Bool)
@ Test C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:355
[7] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[8] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:55 [inlined]
[9] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[10] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:62
Test threw exception
Expression: vec(_mul(A, u)) ≈ L(vec(u), u, p, t) ≈ L * vec(u) ≈ mul!(vec(zero(w)), L, vec(u))
MethodError: no method matching *(::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Nothing, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64}, ::Vector{Float64})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
@ Base operators.jl:587
*(::SciMLOperators.IdentityOperator, ::AbstractVecOrMat)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:41
*(::SciMLOperators.AbstractSciMLOperator, ::SciMLOperators.IdentityOperator)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\basic.jl:100
...
Stacktrace:
[1] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[2] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:62 [inlined]
[3] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[4] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:63
Test threw exception
Expression: vec(α * _mul(A, u) + β * v) ≈ mul!(vec(copy(v)), L, vec(u), α, β)
DimensionMismatch: dimensions must match: a has dims (Base.OneTo(4), Base.OneTo(5), Base.OneTo(6)), b has dims (Base.OneTo(3), Base.OneTo(4), Base.OneTo(5)), mismatch at 1
Stacktrace:
[1] promote_shape
@ .\indices.jl:178 [inlined]
[2] promote_shape(a::Array{Float64, 3}, b::Array{Float64, 3})
@ Base .\indices.jl:169
[3] +(A::Array{Float64, 3}, Bs::Array{Float64, 3})
@ Base .\arraymath.jl:14
[4] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:669 [inlined]
[5] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:63 [inlined]
[6] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[7] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
(Unbatched) FunctionOperator ND array: Error During Test at C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:12
Got exception outside of a @test
DimensionMismatch: second dimension of A, 60, does not match length of x, 120
Stacktrace:
[1] gemv!(y::Vector{Float64}, tA::Char, A::Matrix{Float64}, x::Vector{Float64}, α::Bool, β::Bool)
@ LinearAlgebra C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\matmul.jl:404
[2] generic_matvecmul!
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\matmul.jl:71 [inlined]
[3] mul!
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\matmul.jl:66 [inlined]
[4] mul!
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\matmul.jl:237 [inlined]
[5] *
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\LinearAlgebra\src\matmul.jl:53 [inlined]
[6] (::Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}})(A::Matrix{Float64}, v::Array{Float64, 3})
@ Main.var"##Function Operator#228" C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:31
[7] f
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:32 [inlined]
[8] (::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Nothing, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64})(w::Array{Float64, 3}, v::Array{Float64, 3}, u::Array{Float64, 3}, p::Nothing, t::Float64; kwargs::@Kwargs{})
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\func.jl:826
[9] (::SciMLOperators.FunctionOperator{true, false, false, Float64, Main.var"##Function Operator#228".var"#f#2"{Main.var"##Function Operator#228".var"#_mul#1"{Tuple{Int64, Int64, Int64}}, Matrix{Float64}}, Nothing, Nothing, Nothing, @NamedTuple{islinear::Bool, isconvertible::Bool, isconstant::Bool, opnorm::Nothing, issymmetric::Bool, ishermitian::Bool, isposdef::Bool, isinplace::Bool, outofplace::Bool, has_mul5::Bool, ifcache::Bool, T::DataType, batch::Bool, size::Tuple{Int64, Int64}, sizes::Tuple{Tuple{Int64, Int64, Int64}, Tuple{Int64, Int64, Int64}}, accepted_kwargs::Val{()}, kwargs::@NamedTuple{}}, Nothing, Float64, Tuple{Array{Float64, 3}, Array{Float64, 3}}, Float64, Float64})(w::Array{Float64, 3}, v::Array{Float64, 3}, u::Array{Float64, 3}, p::Nothing, t::Float64)
@ SciMLOperators C:\Users\accou\.julia\dev\SciMLOperators\src\func.jl:817
[10] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:72 [inlined]
[11] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[12] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\func.jl:13
[13] include(mod::Module, _path::String)
@ Base .\Base.jl:495
[14] include(x::String)
@ Main.var"##Function Operator#228" C:\Users\accou\.julia\packages\SafeTestsets\raUNr\src\SafeTestsets.jl:28
[15] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:15 [inlined]
[16] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[17] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:15 [inlined]
[18] top-level scope
@ C:\Users\accou\.julia\packages\SafeTestsets\raUNr\src\SafeTestsets.jl:30
[19] eval(m::Module, e::Any)
@ Core .\boot.jl:385
[20] macro expansion
@ C:\Users\accou\.julia\packages\SafeTestsets\raUNr\src\SafeTestsets.jl:28 [inlined]
[21] macro expansion
@ .\timing.jl:279 [inlined]
[22] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:14 [inlined]
[23] macro expansion
@ C:\Users\accou\.julia\juliaup\julia-1.10.9+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Test\src\Test.jl:1577 [inlined]
[24] macro expansion
@ C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:5 [inlined]
[25] macro expansion
@ .\timing.jl:279 [inlined]
[26] top-level scope
@ C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:269
[27] include(fname::String)
@ Base.MainInclude .\client.jl:494
[28] top-level scope
@ none:6
[29] eval
@ .\boot.jl:385 [inlined]
[30] exec_options(opts::Base.JLOptions)
@ Base .\client.jl:296
[31] _start()
@ Base .\client.jl:557
10.295939 seconds (10.97 M allocations: 754.708 MiB, 1.38% gc time, 61.76% compilation time: <1% of which was recompilation)
10.491964 seconds (13.90 M allocations: 906.726 MiB, 2.99% gc time, 99.11% compilation time)
69.503653 seconds (151.67 M allocations: 7.918 GiB, 3.31% gc time, 99.06% compilation time: <1% of which was recompilation)
Test Summary: | Pass Fail Error Broken Total Time
SciMLOperators | 669 5 14 20 708 2m24.3s
Scalar Operators | 88 1 89 6.7s
Basic Operators | 195 18 213 25.3s
Matrix Operators | 168 4 1 173 22.0s
MatrixOperator, InvertibleOperator | 25 25 1.3s
InvertibleOperator test | 7 7 1.0s
MatrixOperator update test | 5 5 0.2s
DiagonalOperator update test | 6 6 0.4s
Batched Diagonal Operator | 10 10 1.0s
Batched DiagonalOperator update test | 5 5 0.5s
AffineOperator | 27 27 2.1s
AffineOperator update test | 4 4 0.1s
TensorProductOperator | 79 4 1 84 13.9s
Function Operator | 104 5 10 119 10.3s
(Unbatched) FunctionOperator ND array | 2 5 10 17 7.5s
(Unbatched) FunctionOperator | 34 34 1.0s
Batched FunctionOperator | 30 30 0.7s
FunctionOperator update test | 38 38 1.0s
Full tests | 92 92 10.5s
Zygote.jl | 22 22 1m09.5s
ERROR: LoadError: Some tests did not pass: 669 passed, 5 failed, 14 errored, 20 broken.
in expression starting at C:\Users\accou\.julia\dev\SciMLOperators\test\runtests.jl:3
ERROR: Package SciMLOperators errored during testingGetting really close. |
|
Wow, this is evolving much faster, the [WIP] is gone, great stuff. I just realised that I forgot to add the state variable 'u' for persistence and storage in the Function Operator struct, I had that as a todo item, but got buried somewhere down the road. New stuff added since i last viewed [for ref]:
Sorry if i left out on these additions, Tests were sort of messy, things are much cleaner now :) |
|
I think this will merge in like 20 minutes and be done. |
|
I am so happy that we finally have an update for people asking for updates on this : Also, I think this will not be a meme anymore though... :( |
|
Thanks! You got it far enough along that it was easy to just push it over the finish line. |
|
Thank you @ChrisRackauckas It's been a pleasure. |
The SciMLOperators v1.0 project was completed in SciML/SciMLOperators.jl#269. I did a few things to finish it up but most of the work should be attributed to @divital-coder as I just did a few things in a few hours to just handle the last little bits and get it done, he did all of the big nasty work. Thanks! This is a major step we've been waiting on for awhile.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Changes
Methodology
Fixes #223