-
-
Notifications
You must be signed in to change notification settings - Fork 126
Add solution key for Henon-Heles #69
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
-The values for the energy must be bellow 1/6 for bounded solutions -Minor plot adjustments -Add Part 4
I rebased on master and fixed the problem in Part 3 and added Part 4. At Part 4 I get an error when trying to evaluate the solve statement InvalidIRError: compiling gpu_kernel(Cassette.Context{nametype(Ctx),Nothing,Nothing,getfield(GPUifyLoops, Symbol("##PassType#363")),Nothing,Cassette.DisableHooks}, typeof(DiffEqGPU.gpu_kernel), ODEFunction{true,typeof(henon),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}, CUDAnative.CuDeviceArray{Float64,2,CUDAnative.AS.Global}, CUDAnative.CuDeviceArray{Float64,2,CUDAnative.AS.Global}, CUDAnative.CuDeviceArray{Nothing,2,CUDAnative.AS.Global}, Float64) resulted in invalid LLVM IR
Reason: unsupported call to the Julia runtime (call to jl_f_tuple)
Stacktrace:
[1] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:537
[2] throw_boundserror at subarray.jl:43
[3] checkbounds at abstractarray.jl:449
[4] copyto! at multidimensional.jl:874
[5] copyto! at broadcast.jl:838
[6] copyto! at broadcast.jl:797
[7] materialize! at broadcast.jl:756
[8] henon at C:\Users\sebastian\Documents\julia\DiffEqTutorials.jl\tutorials\exercises\02-workshop_solutions.jmd:197
[9] ODEFunction at /mnt/storage/.julia/packages/DiffEqBase/u5mMn/src/diffeqfunction.jl:193
[10] gpu_kernel at /mnt/storage/.julia/packages/DiffEqGPU/QB1WC/src/DiffEqGPU.jl:6
[11] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
Reason: unsupported call to the Julia runtime (call to jl_f_getfield)
Stacktrace:
[1] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:537
[2] throw_boundserror at subarray.jl:43
[3] checkbounds at abstractarray.jl:449
[4] copyto! at multidimensional.jl:874
[5] copyto! at broadcast.jl:838
[6] copyto! at broadcast.jl:797
[7] materialize! at broadcast.jl:756
[8] henon at C:\Users\sebastian\Documents\julia\DiffEqTutorials.jl\tutorials\exercises\02-workshop_solutions.jmd:197
[9] ODEFunction at /mnt/storage/.julia/packages/DiffEqBase/u5mMn/src/diffeqfunction.jl:193
[10] gpu_kernel at /mnt/storage/.julia/packages/DiffEqGPU/QB1WC/src/DiffEqGPU.jl:6
[11] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
Reason: unsupported call to the Julia runtime (call to jl_f_tuple)
Stacktrace:
[1] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:537
[2] throw_boundserror at subarray.jl:43
[3] checkbounds at abstractarray.jl:449
[4] getindex at subarray.jl:260
[5] henon at C:\Users\sebastian\Documents\julia\DiffEqTutorials.jl\tutorials\exercises\02-workshop_solutions.jmd:191
[6] ODEFunction at /mnt/storage/.julia/packages/DiffEqBase/u5mMn/src/diffeqfunction.jl:193
[7] gpu_kernel at /mnt/storage/.julia/packages/DiffEqGPU/QB1WC/src/DiffEqGPU.jl:6
[8] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
Reason: unsupported call to the Julia runtime (call to jl_f_getfield)
Stacktrace:
[1] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:537
[2] throw_boundserror at subarray.jl:43
[3] checkbounds at abstractarray.jl:449
[4] getindex at subarray.jl:260
[5] henon at C:\Users\sebastian\Documents\julia\DiffEqTutorials.jl\tutorials\exercises\02-workshop_solutions.jmd:191
[6] ODEFunction at /mnt/storage/.julia/packages/DiffEqBase/u5mMn/src/diffeqfunction.jl:193
[7] gpu_kernel at /mnt/storage/.julia/packages/DiffEqGPU/QB1WC/src/DiffEqGPU.jl:6
[8] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
Reason: unsupported call through a literal pointer (call to jl_alloc_array_1d)
Stacktrace:
[1] Type at boot.jl:402
[2] Type at boot.jl:411
[3] Type at boot.jl:419
[4] similar at abstractarray.jl:618
[5] similar at abstractarray.jl:617
[6] vect at array.jl:130
[7] henon at C:\Users\sebastian\Documents\julia\DiffEqTutorials.jl\tutorials\exercises\02-workshop_solutions.jmd:197
[8] ODEFunction at /mnt/storage/.julia/packages/DiffEqBase/u5mMn/src/diffeqfunction.jl:193
[9] gpu_kernel at /mnt/storage/.julia/packages/DiffEqGPU/QB1WC/src/DiffEqGPU.jl:6
[10] overdub at /mnt/storage/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
Reason: unsupported call through a literal pointer (call to jl_object_id)
Stacktrace:
.... |
I also tried the following for the GPU part
but the error is still present. |
The problem was due to the input not being |
Thanks! |
I added the solution key for problem 5. Let me know if the approach is ok.
I was wondering if I should have used ModeingTookit.jl for the system definition.
For the initial condition generation I used a simple rejection sampling like in @Datseris example here.
I also think there was a typo in the mathematical description of the the
SecondOrderODEProblem
.Right now there is a problem with the initial conditions and with threading this crashes julia
Probably the numbers have to be tweaked a bit. I will investigate this further.
I was also thinking of doing the initial condition generation a bit more general (so that there is no need to hardcode arbitrary numbers) with IntervalConstraintProgramming.jl, but for a exercise marked for beginners, I think it's a bit too much.