-
-
Notifications
You must be signed in to change notification settings - Fork 238
Example: Calling External Solvers #49
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
Comments
Did you do the install from this page? http://juliadiffeq.github.io/DifferentialEquations.jl/latest/man/conditional_dependencies.html Most of the installs are not for the latest tag:
Did ODEInterface build for you? Try `Pkg.build("ODEInterface"). I realized that the links in the README broke when we moved to JuliaDiffEq, so I just pushed up a fix for that (you might need to refresh). |
The answer is no for some of them. Should I remove the existing packages and install from http://juliadiffeq.github.io/DifferentialEquations.jl/latest/man/conditional_dependencies.html http://juliadiffeq.github.io/DifferentialEquations.jl/latest/man/conditional_dependencies.html What is the right sequence of commands to return to this point. From: Christopher Rackauckas [mailto:[email protected]] Did you do the install from this page:? http://juliadiffeq.github.io/DifferentialEquations.jl/latest/man/conditional_dependencies.html Most of the installs are not for the latest tag:
Did ODEInterface build for you? Try `Pkg.build("ODEInterface"). I realized that the links in the README broke when we moved to JuliaDiffEq, so I just pushed up a fix for that (you might need to refresh). — |
To get to the right branch for Sundials, you just need to do Pkg.checkout("Sundials") If you followed the previous instructions for using it pre-JuliaDiffEq/Sundials.jl#67, you will need to Pkg.rm("Sundials")
Pkg.add("Sundials")
Pkg.checkout("Sundials")
Pkg.build("Sundials") #Maybe? It might build for you automatically After SciML/Sundials.jl#75, Sundials will get a new minor tag and this will no longer be necessary. For ODE.jl, you need to make sure you're on pwl's repo: Pkg.rm("ODE")
Pkg.clone("https://github.com/JuliaODE/ODE.jl") Notice that the command here is ODEInterface should just work, though it might have building issues. If you run using ODEInterface
loadODESolvers() Do you get errors? |
Sundials is now fine. Let get through the rest. From: Christopher Rackauckas [mailto:[email protected]] To get to the right branch for Sundials, you just need to do Pkg.checkout("Sundials") If you followed the previous instructions for using it pre-JuliaDiffEq/Sundials.jl#67, you will need to Pkg.rm("Sundials") After SciML/Sundials.jl#75 SciML/Sundials.jl#75 , Sundials will get a new minor tag and this will no longer be necessary. For ODE.jl, you need to make sure you're on pwl's repo: Pkg.rm("ODE") Notice that the command here is clone since Pkg.add will get the version from JuliaDiffEq which is not the work-in-progress branch that DifferentialEquations.jl is compatible with (this work-in-progress branch is set to replace the current ODE.jl sometime "soon") ODEInterface should just work, though it might have building issues. If you run using ODEInterface Do you get errors? — |
For ODE, it says that the package already exists. This is after: Pkg.rm(“ODE”) For ODEInterface, nothing doing. From: Christopher Rackauckas [mailto:[email protected]] To get to the right branch for Sundials, you just need to do Pkg.checkout("Sundials") If you followed the previous instructions for using it pre-JuliaDiffEq/Sundials.jl#67, you will need to Pkg.rm("Sundials") After SciML/Sundials.jl#75 SciML/Sundials.jl#75 , Sundials will get a new minor tag and this will no longer be necessary. For ODE.jl, you need to make sure you're on pwl's repo: Pkg.rm("ODE") Notice that the command here is clone since Pkg.add will get the version from JuliaDiffEq which is not the work-in-progress branch that DifferentialEquations.jl is compatible with (this work-in-progress branch is set to replace the current ODE.jl sometime "soon") ODEInterface should just work, though it might have building issues. If you run using ODEInterface Do you get errors? — |
You may want to use the web interface when showing code / error messages. If you tried to put them there, they didn't show up. It might be a little messy to install pwl's branch for ODE.jl. You may need to mess with your local METADATA. Personally, when I switched back and forth I just wiped the METADATA, though that's a nuclear option which requires you re-install your packages (good for testing, bad thing to tell users). You may be able to remove the ODE folder from METADAT (METADATA/ODE), and remove the compile cache ODE.ji, and then run Maybe @mauro3 or @pwl knows of a better way to switch ODE between the different repos more seamlessly? |
For ODEInterface, restart from the beginning. It should be: Pkg.rm("ODEInterface")
Pkg.add("ODEInterface")
Pkg.build("ODEInterface")
loadODESolvers() If nothing errors there, then it should be working. |
At Pkg.build(“ODEInterface”), it says that currently only gfrtran is supported. Does not build. From: Christopher Rackauckas [mailto:[email protected]] For ODEInterface, restart from the beginning. It should be: Pkg.rm("ODEInterface") If nothing errors there, then it should be working. — |
Ahh, and you said you're on Windows? You might have the same path issue I had when I first tried it: luchr/ODEInterface.jl#2 If you are using Juno and added Julia to the path to do so, that can cause this issue. |
So a fast resolution is to remove Juno with Pkg.rm(“Juno”) and then the series on ODEInterface again? From: Christopher Rackauckas [mailto:[email protected]] Ahh, and you said you're on Windows? You might have the same path issue I had when I first tried it: luchr/ODEInterface.jl#2 luchr/ODEInterface.jl#2 If you are using Juno and added Julia to the path to do so, that can cause this issue. — |
No. You need to explicitly give Juno the path, like: Then you need to make sure Julia is not in your path, install mingw-64 from here, and add it to your path like here: (the third path on the far right is where the mingw path is) Then ODEInterface should build correctly on Windows if you're using Juno (this is one of the reasons why I am making native Julia versions of all of those, because this can be a nightmare to get right!) |
The reason The way I switch is add a remote and checkout that. I don't think this can be done from the Julia REPL. In the shell cd to the directory of ODE.jl, (
it will say something about a detached head, don't worry. To go back to the original:
(I think) Edited according to Chris' comment |
Yeah, I feared there wasn't a pure Julia way to do it. What you're saying should work, though maybe it might need to be |
I guess you could open a feature request issue:
But probably it's fine to just leave that. For trickier git-stuff it's easier to just git-it. |
Yeah, I don't know if it's necessary since at the point where you want to specify the remote, you will have had to add the remote with Git anyways, so you probably know git (or are just following someone's instructions line by line which could just be terminal commands) |
I am still struggling with this. Can you pls confirm the end of path for the environment variable. I cannot read your full link. Mine is: C:\Program Files\mingw-w64\x86_64-6.2.0-posix-seh-rt_v5-rev1\mingw64\bin for now. Also can you indicate the content of your juliarc.jl. Atome is working, Juno is installed, the Julia path has been modified as per your instructions. For now, my Julia launcher on the taskbar no longer launches Julia. Thanks From: Christopher Rackauckas [mailto:[email protected]] No. You need to explicitly give Juno the path, like: https://cloud.githubusercontent.com/assets/1814174/18455537/65d323e8-78ff-11e6-961f-92294fbf9b11.PNG Then you need to make sure Julia is not in your path, install mingw-64 from here https://sourceforge.net/projects/mingw-w64/ , and add it to your path like here: https://cloud.githubusercontent.com/assets/1814174/18455571/aa28edb6-78ff-11e6-9172-58d4e5b4297b.PNG Then ODEInterface should build correctly on Windows if you're using Juno (this is one of the reasons why I am making native Julia versions of all of those, because this can be a nightmare to get right!) — |
If you do the standard mingw install linked above and use the path
then (This problem with building it is one of the reasons why I am really gunning for making Julia-native versions of its solvers right now, though its stiff solvers (Radau and when it gets LSODE) will be tough competition for some time) |
Eureka! I can now see the light at the end of the tunnel. I think that you should set up the sequence of steps to get ODEInterface running in your README file. Basically, I threw everything away then: Download and install the latest Julia; Download and install Atom for Windows; Download and install mingw-64 as indicated earlier; In Atom, changed the path as you indicated earlier after installing Julia and Juno; Modified the environment variables adding the mingw-64 path as indicated below; Pkg.add(“”) all that is required as per your instructions. Please note that Nemo is still building cleanly. All other packages eventually build by doing Pkg.add, Pkg.checkout and Pkg.build several times if necessary. For ODEInterface, restart from the beginning. It should be: Pkg.rm("ODEInterface") Pkg.add("ODEInterface") Pkg.build("ODEInterface") loadODESolvers() Finally, Linear Work Precision Diagrams is working for all steps. We can start talking about DifferentialEquations……. From: Christopher Rackauckas [mailto:[email protected]] If you do the standard mingw install linked above and use the path C:\Program Files\mingw-w64\x86_64-6.1.0-posix-seh-rt_v5-rev0\mingw64\bin then Pkg.build("ODEInterface") should work. (This problem with building it is one of the reasons why I am really gunning for making Julia-native versions of its solvers right now, though its stiff solvers (Radau and when it gets LSODE) will be tough competition for some time) — |
Yeah, maybe I should post that somewhere (or maybe since I detailed that in this issue, that's good enough now). Technically it's not a DifferentialEquations.jl problem, but a "building ODEInterface.jl on Windows when you also have Juno installed" problem. Sundials and ODE will work out of the box once they tag new versions (/ the iterator PR SciML/ODE.jl#49 goes through), but I don't know how to hide the fact that getting Fortran compilers on Windows to work correctly is a black art. But if you don't have Juno installed, ODEInterface should just work out of the box. |
Should this issue be closed / are there any problems left here? |
Close #49 From: Christopher Rackauckas [mailto:[email protected]] Should this issue be closed / are there any problems left here? — |
In the external solvers section,
sol =solve(prob::ODEProblem,tspan,Δt=Δt,alg=:ode45)
plot(sol,lab=["x" "y"])
LoadError: UndefVarError: ExplicitODE not defined
while loading In[4], in expression starting on line 1
in #solve#559(::Array{Any,1}, ::Function, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at C:\Users\Denis.julia\v0.5\DifferentialEquations\src\ode\ode_solve.jl:256
in (::DifferentialEquations.#kw##solve)(::Array{Any,1}, ::DifferentialEquations.#solve, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at .:0
then at
sol =solve(prob::ODEProblem,tspan,Δt=Δt,alg=:dopri5)
plot(sol,lab=["x" "y"])
[DifferentialEquations.jl] Initializing backend: ODEInterface
LoadError: Cannot find method(s) for dopri5! I've tried to loadODESolvers(), but it didn't work. Please check ODEInterface.help_solversupport() and call loadODESolvers and check also this output. For further information see also ODEInterface.help_install.
while loading In[5], in expression starting on line 1
in getAllMethodPtrs(::String) at C:\Users\Denis.julia\v0.5\ODEInterface\src.\DLSolvers.jl:229
in dopri5_impl(::Function, ::Float64, ::Float64, ::Array{Float64,1}, ::ODEInterface.OptionsODE, ::ODEInterface.DopriArguments{Int64}) at C:\Users\Denis.julia\v0.5\ODEInterface\src.\Dopri5.jl:128
in dopri5(::Function, ::Float64, ::Float64, ::Array{Float64,1}, ::ODEInterface.OptionsODE) at C:\Users\Denis.julia\v0.5\ODEInterface\src.\Dopri5.jl:102
in odecall(::ODEInterface.#dopri5, ::Function, ::Array{Float64,1}, ::Array{Float64,1}, ::ODEInterface.OptionsODE) at C:\Users\Denis.julia\v0.5\ODEInterface\src.\Call.jl:115
in #solve#559(::Array{Any,1}, ::Function, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at C:\Users\Denis.julia\v0.5\DifferentialEquations\src\ode\ode_solve.jl:216
in (::DifferentialEquations.#kw##solve)(::Array{Any,1}, ::DifferentialEquations.#solve, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at .:0
and again for the next two dopri5
Finally at
sol =solve(prob::ODEProblem,tspan,Δt=Δt,alg=:cvode_Adams)
plot(sol,lab=["x" "y"])
[DifferentialEquations.jl] Initializing backend: Sundials
LoadError: UndefVarError: cvode_fulloutput not defined
while loading In[8], in expression starting on line 1
in #solve#559(::Array{Any,1}, ::Function, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at C:\Users\Denis.julia\v0.5\DifferentialEquations\src\ode\ode_solve.jl:317
in (::DifferentialEquations.#kw##solve)(::Array{Any,1}, ::DifferentialEquations.#solve, ::DifferentialEquations.ODEProblem{Array{Float64,1},Float64}, ::Array{Int64,1}) at .:0
The text was updated successfully, but these errors were encountered: