Skip to content
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

Example: Solving Equations in with Julia-defined Types #52

Closed
finmod opened this issue Sep 12, 2016 · 43 comments
Closed

Example: Solving Equations in with Julia-defined Types #52

finmod opened this issue Sep 12, 2016 · 43 comments

Comments

@finmod
Copy link

finmod commented Sep 12, 2016

For ArbFloats:

INFO: Precompiling module ArbFloats...
ERROR: LoadError: LoadError: BoundsError: attempt to access 3-element Array{String,1} at index [0]
in library_filepath(::String, ::Array{String,1}, ::String) at C:\Users\Denis.julia\v0.5\ArbFloats\src\support\NemoLibs.jl:15
in include_from_node1(::String) at .\loading.jl:426 (repeats 2 times)
in macro expansion; at .\none:2 [inlined]
in anonymous at .:?
in eval(::Module, ::Any) at .\boot.jl:234
in process_options(::Base.JLOptions) at .\client.jl:239
in _start() at .\client.jl:318
while loading C:\Users\Denis.julia\v0.5\ArbFloats\src\support/NemoLibs.jl, in expression starting on line 23
while loading C:\Users\Denis.julia\v0.5\ArbFloats\src\ArbFloats.jl, in expression starting on line 70
LoadError: Failed to precompile ArbFloats to C:\Users\Denis.julia\lib\v0.5\ArbFloats.ji
while loading In[11], in expression starting on line 1

in compilecache(::String) at .\loading.jl:505
in require(::Symbol) at .\loading.jl:364

For DecFP:

LoadError: LoadError: error compiling _parse: could not load library "C:\Users\Denis.julia\v0.5\DecFP\src..\deps\libbid64"
The specified module could not be found.

while loading C:\Users\Denis.julia\v0.5\DecFP\src\DecFP.jl, in expression starting on line 63
while loading In[13], in expression starting on line 1

in macro expansion; at C:\Users\Denis.julia\v0.5\DecFP\src\DecFP.jl:78 [inlined]
in anonymous at .:?
in include_from_node1(::String) at .\loading.jl:426
in eval(::Module, ::Any) at .\boot.jl:234
in require(::Symbol) at .\loading.jl:357

For Decimals:

LoadError: TypeError: ODEProblem: in uEltype, expected uEltype<:Number, got Type{Decimals.Decimal}
while loading In[15], in expression starting on line 2

in #ODEProblem#235(::Function, ::Type{T}, ::Function, ::Array{Decimals.Decimal,1}) at C:\Users\Denis.julia\v0.5\DifferentialEquations\src\general\problems.jl:408
in (::Core.#kw#Type)(::Array{Any,1}, ::Type{DifferentialEquations.ODEProblem}, ::Function, ::Array{Decimals.Decimal,1}) at .:0

For DoubleDouble:

LoadError: MethodError: Cannot convert an object of type Rational{Int64} to an object of type DoubleDouble.Double{Float64}
This may have arisen from a call to the constructor DoubleDouble.Double{Float64}(...),
since type constructors fall back to convert methods.
while loading In[16], in expression starting on line 3

in #solve#559(::Array{Any,1}, ::Function, ::DifferentialEquations.ODEProblem{DoubleDouble.Double{Float64},DoubleDouble.Double{Float64}}, ::Array{Int64,1}) at C:\Users\Denis.julia\v0.5\DifferentialEquations\src\ode\ode_solve.jl:173
in (::DifferentialEquations.#kw##solve)(::Array{Any,1}, ::DifferentialEquations.#solve, ::DifferentialEquations.ODEProblem{DoubleDouble.Double{Float64},DoubleDouble.Double{Float64}}, ::Array{Int64,1}) at .:0

@ChrisRackauckas
Copy link
Member

Did you install ArbFloats and DecFP? Note that ArbFloats requires Nemo to be installed (at least it used to). These two should work.

[Should I make it more explicit that the packages for these number types have to be installed separately? I thought it was implied, but if it isn't obvious then I should add that the install instructions]

In my tests, Decimals.jl, ArbReals, and DoubleDouble.jl don't work right now. That's stated in the notebooks. DoubleDouble doesn't let you multiply ints among other issues, which causes it to fail. ArbReals is still in development, and Decimals doesn't have an abs function. These number packages need more functions to be compatible (as stated in the notebook).

@finmod
Copy link
Author

finmod commented Sep 12, 2016

Yes, you should be clearer or perhaps use colors for the package names. The sequence should also be indicated: Nemo then ArbFloats then others.

In any case Nemo did not compile properly for me thus stalling the whole process.

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Monday, September 12, 2016 10:07 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

Did you install ArbFloats and DecFP? Note that ArbFloats requires Nemo to be installed (at least it used to). These two should work.

[Should I make it more explicit that the packages for these number types have to be installed separately? I thought it was implied, but if it isn't obvious then I should add that the install instructions]

In my tests, Decimals.jl, ArbReals, and DoubleDouble.jl don't work right now. That's stated in the notebooks. DoubleDouble doesn't let you multiply ints among other issues, which causes it to fail. ArbReals is still in development, and Decimals doesn't have an abs function. These number packages need more functions to be compatible (as stated in the notebook).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIiqEh5MXMabitRHX8YyCmkNvOliYks5qpb7wgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIuto7G-uZR_E39F1DXO5KVa9FFT2ks5qpb7wgaJpZM4J7BtJ.gif

@ChrisRackauckas
Copy link
Member

Nemo is hard to compile for some reason... I just tried it update the example and it's failing. I'll post what I had to do when I get it. Note that I have to use my VNC to a Linux computer to do this: I haven't gotten Nemo to compile on Windows ever.

@JeffreySarnoff did you mention before that you're working on a version of ArbFloats that doesn't require Nemo? That would be really helpful.

@ChrisRackauckas
Copy link
Member

The other examples were changed, and it should be more clear which ones are compatible and which ones are not. DecFP's example should work now (it needed the constant to also be Dec128, which it was until the problem definition changed to the new way which is causing all of these example issues). Let me know if that works.

What's left is that ArbFloats is compatible, but I need the example to show that again. For that, I need Nemo to build.

@finmod
Copy link
Author

finmod commented Sep 12, 2016

For Nemo, this is the answer. I am on Windows 64-bit and Anaconda3.4.1

Should I switch to Ubuntu for all future work? I have Ubuntu 16.04 and Ananconda2.4.1 (but not now…I have it on a VirtualBox with a few bugs to iron out)

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Monday, September 12, 2016 10:27 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

Nemo is hard to compile for some reason... I just tried it update the example and it's failing. I'll post what I had to do when I get it. Note that I have to use my VNC to a Linux computer to do this: I haven't gotten Nemo to compile on Windows ever.

@JeffreySarnoff https://github.com/JeffreySarnoff did you mention before that you're working on a version of ArbFloats that doesn't require Nemo? That would be really helpful.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIkeqmO-cQfAWSqXO7bQb8PurbTPYks5qpcO2gaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIlx0kS-7tiVB8I-IfVtzIfTdFavyks5qpcO2gaJpZM4J7BtJ.gif

@ChrisRackauckas
Copy link
Member

ChrisRackauckas commented Sep 12, 2016

I got Nemo (/ArbFloats) to install just by doing Pkg.add("Nemo") a few times... I think I had to do that last time. I wonder what's up there. Try it yourself and see if it does the same thing? An open an issue if it does. It might also be because I closed the IJulia notebooks, then it worked.

But ArbFloats has a new problem. For more compatibility I added a float call some time ago in my calculation for the L^2 error. ArbFloats don't have a float method, but it's simple to fix because it should be a no-op. I put a PR on the ArbFloats repo which should fix this: jsarnoff-juliacon/ArbFloats.jl#1 . To see that this is the issue:

using ArbFloats
import Base: float
const arbalpha = ArbFloat(1.01)
float(arbalpha)

That will error, while

using ArbFloats
import Base: float
float(x::ArbFloat) = x
const arbalpha = ArbFloat(1.01)

That won't.

@ChrisRackauckas
Copy link
Member

If you use Ubuntu, be careful because the PPA is old:

https://groups.google.com/forum/#!searchin/julia-users/ubuntu%7Csort:date/julia-users/0_MdWfGtUZw/45QGhg_9AAAJ

I use CentOS, and the COPR repository. It stays up to date quite well. Note that there are fewer and fewer features which "require" Linux as time goes on. I work most of the time on Windows so I tend to point out and try to fix these issues as they come up, but since most developers are on Linux, these issues tend to get overlooked. For example:

  • ODEInterface may have trouble building on Windows if you have another mingw-64 library somewhere in your path
  • ImageMagick.jl breaks on Windows periodically (this will cause the animations to not work)
  • Nemo can be hard to build on Windows. I'll give it a try now that its tests say its compatible, but in the past it failed.
  • ParallelAccelerator.jl will be adding Windows compatibility, but it clearly favors Linux. I haven't tested this with DifferentialEquations.jl, but it should work out of the box (use it on the function f for the ODEProblem)

The list can go on. Really, if you're dealing with something that uses some C/Fortran binary, it's more likely to work the first time if you're on Linux, because the developer of that package probably used Linux.

@finmod
Copy link
Author

finmod commented Sep 12, 2016

Thank you for taking me through all these headaches in Julia on your examples folder.

Not had problems so far with Julia but then I never got into packages in development. I now have a better feel for errors and package bugs and idiosyncrasies.

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Monday, September 12, 2016 10:54 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

If you use Ubuntu, be careful because the PPA is old:

https://groups.google.com/forum/#!searchin/julia-users/ubuntu%7Csort:date/julia-users/0_MdWfGtUZw/45QGhg_9AAAJ

I use CentOS, and the COPR repository. It stays up to date quite well. Note that there are fewer and fewer features which "require" Linux as time goes on. I work most of the time on Windows so I tend to point out and try to fix these issues as they come up, but since most developers are on Linux, these issues tend to get overlooked. For example:

  • ODEInterface may have trouble building on Windows if you have another mingw-64 library somewhere in your path
  • ImageMagick.jl breaks on Windows periodically (this will cause the animations to not work)
  • Nemo can be hard to build on Windows. I'll give it a try now that its tests say its compatible, but in the past it failed.
  • ParallelAccelerator.jl will be adding Windows compatibility, but it clearly favors Linux. I haven't tested this with DifferentialEquations.jl, but it should work out of the box (use it on the function f for the ODEProblem)

The list can go on. Really, if you're dealing with something that uses some C/Fortran binary, it's more likely to work the first time if you're on Linux, because the developer of that package probably used Linux.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIt4mXXHhML71qrpKDVuyl0QOlgjQks5qpcnagaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIp7PN45HOp7RcZS4vcX7NMdixi0cks5qpcnagaJpZM4J7BtJ.gif

@finmod
Copy link
Author

finmod commented Sep 12, 2016

Nemo has installed properly (as different from last time) but ArbFloats does not work any better.

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Monday, September 12, 2016 10:49 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

I got Nemo (/ArbFloats) to install just by doing Pkg.add("Nemo") a few times... I think I had to do that last time. I wonder what's up there. Try it yourself and see if it does the same thing? An open an issue if it does. It might also be because I closed the IJulia notebooks, then it worked.

But ArbFloats has a new problem. For more compatibility I added a float call some time ago in my calculation for the L^2 error. ArbFloats don't have a float method, but it's simple to fix because it should be a no-op. I put a PR on the ArbFloats repo which should fix this: jsarnoff-juliacon/ArbFloats.jl#1 jsarnoff-juliacon/ArbFloats.jl#1


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIn-Soddo93nl8Ys7cxvnfVGxOniaks5qpcjLgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIvgSfhLhc_biACXiY818f7jp5KIaks5qpcjLgaJpZM4J7BtJ.gif

@ChrisRackauckas
Copy link
Member

It's good. Thanks for showing me where they are. I needed to go back through them since I just did a big update to make continuous output (interpolated dense function) part of the default, changed the pre-made problems to compile better (required for testing multithreading properly), switched the API from (du,u,u) to (t,u,du). While internally that doesn't break much, that causes the definitions for the problems to have to change, which means just about every example breaks...

Yes, ArbFloats will still have an error since that package needs to add the no-op:

float(x::ArbFloats) = x

Once he adds that one line, it should work again (it previously wasn't calculating the errors. Now that it does, it needs the float command). I put in a PR so all he has to do is say yes and it'll work.

@ChrisRackauckas
Copy link
Member

If you make it so that way it doesn't have to calculate the errors, i.e. don't give ODEProblem the analytical solution:

using ArbFloats
const arbalpha = ArbFloat(1.01)
f = (t,u) -> (arbalpha*u)
analytic = (t,u₀) -> u₀*exp(arbalpha*t)
prob_ode_arbfloatlinear = ODEProblem(f,ArbFloat(1)/ArbFloat(2))
sol =solve(prob_ode_arbfloatlinear::ODEProblem,[0,1],Δt=1//2^(6),save_timeseries=true,alg=:RK4)
println(sol[end]); typeof(sol[end])

That should work. It's just that ODEProblem(f,ArbFloat(1)/ArbFloat(2),analytic=analytic) also gives the errors from the analytical solution, which requires the float no-op function that I pointed out. Anyway, I'll wait for the PR to go through so that way the example is more full-featured.

@finmod
Copy link
Author

finmod commented Sep 12, 2016

Since I am on GMT+1, I will make all the updates later today when the dust has settled.

I will also reply to #47.

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Monday, September 12, 2016 11:50 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

It's good. Thanks for showing me where they are. I needed to go back through them since I just did a big update to make continuous output (interpolated dense function) part of the default, changed the pre-made problems to compile better (required for testing multithreading properly), switched the API from (du,u,u) to (t,u,du). While internally that doesn't break much, that causes the definitions for the problems to have to change, which means just about every example breaks...

Yes, ArbFloats will still have an error since that package needs to add the no-op:

float(x::ArbFloats) = x

Once he adds that one line, it should work again (it previously wasn't calculating the errors. Now that it does, it needs the float command). I put in a PR so all he has to do is say yes and it'll work.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIk-sAHEPuskurseMo76FRI8ylX08ks5qpdctgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIpikcrIszJjOPBTG9FZxYzV-TTDxks5qpdctgaJpZM4J7BtJ.gif

@ChrisRackauckas
Copy link
Member

The ArbFloats PR went through. It should work now.

@finmod
Copy link
Author

finmod commented Sep 14, 2016

Yes, this is the outstanding issue. Do you agree with the following sequence:

Pkg.rm(“Nemo”)

PKg.rm(“ArbFloats”)

Pkg.add(“Nemo)

Insist with Pkg.add and Pks.checkout(“Nemo”) and Pkg.build(“Nemo”) even though the gfortran error may not disappear.

Then

Pkg. add(“ArbFloats”) or Pkg.clone(?)

Pkg.update()

Rerun the Solving….with Julia notebook

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Wednesday, September 14, 2016 6:49 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

The ArbFloats PR went through. It should work now.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIn7MAIRycBxQPByti7MfZD7DCI07ks5qqDNvgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyInfd0qVFXDTQjA6liGcc1fsjAtWBks5qqDNvgaJpZM4J7BtJ.gif

@JeffreySarnoff
Copy link

JeffreySarnoff commented Sep 14, 2016

I do this:

Pkg.rm("ArbFloats");Pkg.rm("ArbFloats);
# and sometimes (not if Nemo 0.5 is working)
#  Pkg.rm("Nemo");Pkg.rm("Nemo")
Pkg.clone("git://github.com/JuliaArbTypes/ArbFloats.jl.git"
quit()
Pkg.checkout("ArbFloats")
using ArbFloats

(that master is in flux -- but the stuff I am changing, stuff about obtaining the radius, pbly does not matter to you)

@ChrisRackauckas
Copy link
Member

Oh wait, are there two ArbFloats.jl's? I meant to put that PR into the repo you get from Pkg.add.

@ChrisRackauckas
Copy link
Member

(Also, I thought ArbFloats were ArbReals with no radius?)

@JeffreySarnoff
Copy link

I did that.

On Wed, Sep 14, 2016 at 4:56 PM, Christopher Rackauckas <
[email protected]> wrote:

Oh wait, are there two ArbFloats.jl's? I meant to put that PR into the
repo you get from Pkg.add.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxh0A3SkPgk7HFM1zaOhG9pn69yuZks5qqF-XgaJpZM4J7BtJ
.

@JeffreySarnoff
Copy link

... Give me 5min and I will clarify

On Wed, Sep 14, 2016 at 4:58 PM, Christopher Rackauckas <
[email protected]> wrote:

(Also, I thought ArbFloats were ArbReals with no radius?)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxsnJI1nJ4nF6AeYNExcNQLN_oYAZks5qqF_cgaJpZM4J7BtJ
.

@finmod
Copy link
Author

finmod commented Sep 14, 2016

Better to restart from Nemo and ArbFloats removed twice.

Also I am on Windows with mingw-w64 installed on the path

From: Jeffrey Sarnoff [mailto:[email protected]]
Sent: Wednesday, September 14, 2016 10:00 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Author [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

... Give me 5min and I will clarify

On Wed, Sep 14, 2016 at 4:58 PM, Christopher Rackauckas <
[email protected] mailto:[email protected] > wrote:

(Also, I thought ArbFloats were ArbReals with no radius?)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxsnJI1nJ4nF6AeYNExcNQLN_oYAZks5qqF_cgaJpZM4J7BtJ
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIuxEaFKfj09aAsqoECPsxA9fwXR-ks5qqGA-gaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIlr8lbnjKh-4-SrwGtCBiP6Zk_Shks5qqGA-gaJpZM4J7BtJ.gif

@JeffreySarnoff
Copy link

@finmod yep
@ChrisRackauckas ...
ArbFloats is about the Floating Point values -- there is permitted access to the underlying midpoint/radius and lo,hi=bounds(x) representations because that is useful for some things and (more importantly) it gives me a chance to test that that stuff works.
For extended precision floating point values, ArbDecimals (to be reworked) is the thin layer atop ArbFloats that exports ArbDec25 [~25 decimal digits], ArbDec50{75,100,150,200,250,300} and those types should be used for extra reliable extended precision work. AFAIK there is only one oddity to resolve (maybe two) with arb floats -- I could use a second pair of eyes, and am putting together a simple example.

@JeffreySarnoff
Copy link

the difference btwn ArbFloats ans ArbDecimals is (a) precision is in decimal digits rather than bits and (b) internal math is done at twice the working precision+a few (q.v. Professor Kahan).

@ChrisRackauckas
Copy link
Member

@finmod If you're on Windows with v0.5 I confirmed that Nemo won't build: wbhart/Nemo.jl#68.

@JeffreySarnoff Oh, I didn't know those were still there. we might want to setup plot recipes for ArbFloats then so that we you get a shaded band for the interval, and a line in the middle.

If ArbFloats and ArbDecimals has all of these, then what does the ArbReal add?

@JeffreySarnoff
Copy link

Plot recipes yah!
ArbFloats is the thick substrate. ArbDecimals is the more reliably
reliable thin layer on ArbFloats. ArbReal is a name -- It was going to be
what ArbDecimals is -- I will take it down soon.

On Wed, Sep 14, 2016 at 5:13 PM, Christopher Rackauckas <
[email protected]> wrote:

@finmod https://github.com/finmod If you're on Windows with v0.5 I
confirmed that Nemo won't build: wbhart/Nemo.jl#68
https://github.com/wbhart/Nemo.jl/issues/68.

@JeffreySarnoff https://github.com/JeffreySarnoff Oh, I didn't know
those were still there. we might want to setup plot recipes for ArbFloats
then so that we you get a shaded band for the interval, and a line in the
middle.

If ArbFloats and ArbDecimals has all of these, then what does the ArbReal
add?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxsHljlIlM7dqOvp2t7b6wE01F5Ojks5qqGOFgaJpZM4J7BtJ
.

@ChrisRackauckas
Copy link
Member

Okay. Thanks for the update. So in total: ArbFloats and ArbDecimals both act the same, except the precision for ArbFloats is the number of bits, while for ArbDecimals it's the number of accurate decimals?

@JeffreySarnoff
Copy link

If ArbDecimals were done, yes.

On Wed, Sep 14, 2016 at 5:59 PM, Christopher Rackauckas <
[email protected]> wrote:

Okay. Thanks for the update. So in total: ArbFloats and ArbDecimals both
act the same, except the precision for ArbFloats is the number of bits,
while for ArbDecimals it's the number of accurate decimals?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxqRVXeI2RHf34n4R2LQA2-J9-jF2ks5qqG4ogaJpZM4J7BtJ
.

@ChrisRackauckas
Copy link
Member

Is there a reason to have both ArbDecimals and ArbFloats, and not just one number type with two ways of setting its precision (or have it be a parametric type with a parameter for whether it's a decimal or float type)? What's gained by having them completely separate?

@JeffreySarnoff
Copy link

It is important that they be separate. Think of ArbFloats as the machinery
and ArbDecimals as the interface that most will use. In order to have e.g.
ArbComplex or ArbIntervals they are atop ArbFloats but not ArbDecimals.
ArbFloats is a perspecitive on the Arb library (for real values).
ArbDecimals is a reliability-enhancing interface thereto.

On Wed, Sep 14, 2016 at 6:16 PM, Christopher Rackauckas <
[email protected]> wrote:

Is there a reason to have both ArbDecimals and ArbFloats, and not just one
number type with two ways of setting its precision (or have it be a
parametric type with a parameter for whether it's a decimal or float type)?
What's gained by having them completely separate?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxg61oeB8WFnEbXkxFfs-qdnTShxUks5qqHJBgaJpZM4J7BtJ
.

@JeffreySarnoff
Copy link

It would be clumsy to make ArbFloats be what ArbDecimals is to be, and then
do other stuff with it.

On Wed, Sep 14, 2016 at 6:19 PM, Jeffrey Sarnoff [email protected]
wrote:

It is important that they be separate. Think of ArbFloats as the
machinery and ArbDecimals as the interface that most will use. In order to
have e.g. ArbComplex or ArbIntervals they are atop ArbFloats but not
ArbDecimals. ArbFloats is a perspecitive on the Arb library (for real
values). ArbDecimals is a reliability-enhancing interface thereto.

On Wed, Sep 14, 2016 at 6:16 PM, Christopher Rackauckas <
[email protected]> wrote:

Is there a reason to have both ArbDecimals and ArbFloats, and not just
one number type with two ways of setting its precision (or have it be a
parametric type with a parameter for whether it's a decimal or float type)?
What's gained by having them completely separate?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxg61oeB8WFnEbXkxFfs-qdnTShxUks5qqHJBgaJpZM4J7BtJ
.

@ChrisRackauckas
Copy link
Member

Got it. I understand now.

@JeffreySarnoff
Copy link

ArbFloats is is more like BigFloats is. ArbDecimals is more like BigFloats
should be (imo).

On Wed, Sep 14, 2016 at 6:20 PM, Jeffrey Sarnoff [email protected]
wrote:

It would be clumsy to make ArbFloats be what ArbDecimals is to be, and
then do other stuff with it.

On Wed, Sep 14, 2016 at 6:19 PM, Jeffrey Sarnoff <
[email protected]> wrote:

It is important that they be separate. Think of ArbFloats as the
machinery and ArbDecimals as the interface that most will use. In order to
have e.g. ArbComplex or ArbIntervals they are atop ArbFloats but not
ArbDecimals. ArbFloats is a perspecitive on the Arb library (for real
values). ArbDecimals is a reliability-enhancing interface thereto.

On Wed, Sep 14, 2016 at 6:16 PM, Christopher Rackauckas <
[email protected]> wrote:

Is there a reason to have both ArbDecimals and ArbFloats, and not just
one number type with two ways of setting its precision (or have it be a
parametric type with a parameter for whether it's a decimal or float type)?
What's gained by having them completely separate?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxg61oeB8WFnEbXkxFfs-qdnTShxUks5qqHJBgaJpZM4J7BtJ
.

@ChrisRackauckas
Copy link
Member

@finmod I just checked, using the ArbFloats master will work again. An updated notebook shows the current state.

@JeffreySarnoff
Copy link

no .. ArbFloats is the substrate, it is like BigFloat. ArbDecimals is a highly reliable layer atop ArbFloats .. it is like I would want BigFloat to be.

@finmod
Copy link
Author

finmod commented Sep 15, 2016

On Windows nothing doing, ArbFloats does not compile (Bounds error) because Nemo does not compile (gfortran..). My set up is: new Julia, new Atome, set Julia path set mingw-x64 path.

Should I set up on Ubuntu? I have 16.04 but the latest Julia is still 0.4 something and not 0.5 yet.

This is the only notebook with errors, everything else runs fine. Perhaps I could wait until the dust settle on this notebook!

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Thursday, September 15, 2016 12:10 AM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Mention [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

@finmod https://github.com/finmod I just checked, using the ArbFloats master will work again. An updated notebook shows the current state.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIrycq9WyL1ZPD0X0KEL11QDB81sQks5qqH7YgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIu1f2w7bA9PiKIkQms_r5F9dQoEAks5qqH7YgaJpZM4J7BtJ.gif

@ChrisRackauckas
Copy link
Member

Well if you want to test it, you'll need to go to Linux until Nemo fixes the issue that it cannot install on Windows since libgit2 no longer exists in Julia's Windows binary (wbhart/Nemo.jl#68). I have tests showing it works, and @JeffreySarnoff has tests on his end that the conversions are good now, so I am sure that, in the right setup (which currently means Linux) this feature is available. Since it's an optional feature this isn't worrisome: ArbFloats are faster than BigFloats but you can always use BigFloats here.

So I'm going to close this issue since what's left isn't on my end, it's a Nemo.jl issue.

@JeffreySarnoff
Copy link

There is a long standing recurrent issue with Julia on Windows -- it works,
but some of everything Julia that works on Linux and OSX always takes
longer to become working without hassle on Windows. For many packages, it
does not matter. When subcompilation and other low level interdependencies
exist, then there can be lacunae. My primary workhorse computer has been a
souped up Win7 machine for three+ years and what I learned (painfully, back
in the earlier days of Julia) is that it makes most sense to use
VirtualBox and create a Linux box that runs from inside windows (ubuntu or
whatever -- I use linuxmint). That allows cut and paste as well as a
shared directory or two for transferral btwn OS for working. And it is
just so much easier to work with Julia that way.

If you want to do that -- let me know and I will talk you through it.

-- Jeffrey

On Thu, Sep 15, 2016 at 5:02 PM, finmod [email protected] wrote:

On Windows nothing doing, ArbFloats does not compile (Bounds error)
because Nemo does not compile (gfortran..). My set up is: new Julia, new
Atome, set Julia path set mingw-x64 path.

Should I set up on Ubuntu? I have 16.04 but the latest Julia is still 0.4
something and not 0.5 yet.

This is the only notebook with errors, everything else runs fine. Perhaps
I could wait until the dust settle on this notebook!

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Thursday, September 15, 2016 12:10 AM
To: JuliaDiffEq/DifferentialEquations.jl <DifferentialEquations.jl@
noreply.github.com>
Cc: finmod [email protected]; Mention [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving
Equations in with Julia-defined Types (#52)

@finmod https://github.com/finmod I just checked, using the ArbFloats
master will work again. An updated notebook shows the current state.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/
/issues/52#issuecomment-247184717> ,
or mute the thread <https://github.com/notifications/unsubscribe-auth/
AMHyIrycq9WyL1ZPD0X0KEL11QDB81sQks5qqH7YgaJpZM4J7BtJ> . <
https://github.com/notifications/beacon/AMHyIu1f2w7bA9PiKIkQms_
r5F9dQoEAks5qqH7YgaJpZM4J7BtJ.gif>


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxicPBgtqgc7X3A9Vo4zYqipE4Pwcks5qqbJ3gaJpZM4J7BtJ
.

@ChrisRackauckas
Copy link
Member

Hopefully when Julia switches over to the Windows 10 Linux subsystem (Ubuntu) it will use all of the standard compilers and therefore just work. It seems like that's the case (it builds fine, works fine), but needs a little bit more love to be "standard".

@JeffreySarnoff
Copy link

@finmod meanwhile -- if you choose to go VirtualBox (dual boot gives you better performing Linux, but cut * paste from Win to Linux and back becomes a drag) ...

@finmod
Copy link
Author

finmod commented Sep 16, 2016

This is correct lxss is fine from the computing side. Unfortunately, Jupyter/browser interaction is not supported right now. Just hope that this improves sometime soon.

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Friday, September 16, 2016 12:46 AM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Mention [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

Hopefully when Julia switches over to the Windows 10 Linux subsystem (Ubuntu) it will use all of the standard compilers and therefore just work. It seems like that's the case (it builds fine, works fine), but needs a little bit more love to be "standard".


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIvGJ7mUzq7t0NP38mL-OxqnSepl9ks5qqdipgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyItIe--_u0jR31dUCrzG6EDEApyLDks5qqdipgaJpZM4J7BtJ.gif

@finmod
Copy link
Author

finmod commented Sep 16, 2016

This is available to me too and works fine for Anaconda python on Ubuntu 16.04.

The problem with VirtualBox 5.1 is how to install Julia 0.5.0 on Ubuntu 16.04 (xenial). Is it needed?

Finmod

From: Jeffrey Sarnoff [mailto:[email protected]]
Sent: Thursday, September 15, 2016 11:17 PM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Mention [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

There is a long standing recurrent issue with Julia on Windows -- it works,
but some of everything Julia that works on Linux and OSX always takes
longer to become working without hassle on Windows. For many packages, it
does not matter. When subcompilation and other low level interdependencies
exist, then there can be lacunae. My primary workhorse computer has been a
souped up Win7 machine for three+ years and what I learned (painfully, back
in the earlier days of Julia) is that it makes most sense to use
VirtualBox and create a Linux box that runs from inside windows (ubuntu or
whatever -- I use linuxmint). That allows cut and paste as well as a
shared directory or two for transferral btwn OS for working. And it is
just so much easier to work with Julia that way.

If you want to do that -- let me know and I will talk you through it.

-- Jeffrey

On Thu, Sep 15, 2016 at 5:02 PM, finmod <[email protected] mailto:[email protected] > wrote:

On Windows nothing doing, ArbFloats does not compile (Bounds error)
because Nemo does not compile (gfortran..). My set up is: new Julia, new
Atome, set Julia path set mingw-x64 path.

Should I set up on Ubuntu? I have 16.04 but the latest Julia is still 0.4
something and not 0.5 yet.

This is the only notebook with errors, everything else runs fine. Perhaps
I could wait until the dust settle on this notebook!

From: Christopher Rackauckas [mailto:[email protected]]
Sent: Thursday, September 15, 2016 12:10 AM
To: JuliaDiffEq/DifferentialEquations.jl <DifferentialEquations.jl@ mailto:DifferentialEquations.jl@%0b
noreply.github.com>
Cc: finmod <[email protected] mailto:[email protected] >; Mention <[email protected] mailto:[email protected] >
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving
Equations in with Julia-defined Types (#52)

@finmod https://github.com/finmod I just checked, using the ArbFloats
master will work again. An updated notebook shows the current state.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/ https://github.com/%0b
/issues/52#issuecomment-247184717> ,
or mute the thread <https://github.com/notifications/unsubscribe-auth/ https://github.com/notifications/unsubscribe-auth/%0b
AMHyIrycq9WyL1ZPD0X0KEL11QDB81sQks5qqH7YgaJpZM4J7BtJ> . <
https://github.com/notifications/beacon/AMHyIu1f2w7bA9PiKIkQms_
r5F9dQoEAks5qqH7YgaJpZM4J7BtJ.gif>


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABmqxicPBgtqgc7X3A9Vo4zYqipE4Pwcks5qqbJ3gaJpZM4J7BtJ
.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIj6bLG2MslilwojGKuqFTdFjcpwOks5qqcPGgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIhfwt38TNn6JhtUyOfbAavadt-Q0ks5qqcPGgaJpZM4J7BtJ.gif

@JeffreySarnoff
Copy link

I had no issues at all installing Julia v0.5-rc4 on LinuxMint v18 (which is built on top of Ubuntu 16.04) running on VirtualBox version 5.1.2 from Win7.

I download the generic_linux_x64 julia
and expand the file into downloads. Then I open an admin window showing the files, and a second admin window which I use to get to /usr/local. I select all the directories in the julia directory (bin, include, etc ...) and cut them then paste them into the /usr/local window (it asks about merging directories and overwriting files, yes to both). Then at the normal terminal type julia.

@finmod
Copy link
Author

finmod commented Sep 17, 2016

Thank you for this accurate set up instructions for LinuxMint on VBox as an alternative to Canonical Ubuntu. I have implemented it and it works with the additional detail that “open an admin window” in LinuxMint is done using

$ gksudo nemo

And then cut and paste as advocated.

Howver, I also noted all the similaries with standard setup with Canonical Ubuntu 16.04. The latter work also better for me with QHD display and touchscreen activated via VBoxGuestAdditions which did not work out as intuitively on LinuxMint.

Reverting to Ubuntu on VBox, the gksudo nemo is not standard and it can be set up as follows:

Sudo add-apt-repository ppa:webupd8team/nemo

Sudo apt-get install install nemo nemo-fileroller

Then $ gksudo nemo works as in LinuxMint

On Ubuntu, the build of ArbFloats is a lengthy process with quite a few downloads that may be subject to errors. All in all. I still do not get Bingo! For ArbFloats. The error message is:

LoadError: UndefVarError: initialize_arb not defined

while loading In[6], in expression starting on line 6

in copy at /home/denis/.julia/v0.5/ArbFloats/src/basics/primitive.jl:37 [inlined]

in #solve#559(::Array{Any,1}, ::Function, ::DifferentialEquations.ODEProblem{ArbFloats.ArbFloat{116},ArbFloats.ArbFloat{116}}, ::Array{Int64,1}) at /home/denis/.julia/v0.5/DifferentialEquations/src/ode/ode_solve.jl:56

in (::DifferentialEquations.#kw##solve)(::Array{Any,1}, ::DifferentialEquations.#solve, ::DifferentialEquations.ODEProblem{ArbFloats.ArbFloat{116},ArbFloats.ArbFloat{116}}, ::Array{Int64,1}) at ./:0

But we are 90% there, Nemo and ArbFloats build with no warnings or errors, packages update are also clean.

From: Jeffrey Sarnoff [mailto:[email protected]]
Sent: Friday, September 16, 2016 10:14 AM
To: JuliaDiffEq/DifferentialEquations.jl [email protected]
Cc: finmod [email protected]; Mention [email protected]
Subject: Re: [JuliaDiffEq/DifferentialEquations.jl] Example: Solving Equations in with Julia-defined Types (#52)

I had no issues at all installing Julia v0.5-rc4 on LinuxMint v18 (which is built on top of Ubuntu 16.04) running on VirtualBox version 5.1.2 from Win7.

I download the generic_linux_x64 julia https://www.google.com/url?q=https%3A%2F%2Fs3.amazonaws.com%2Fjulialang%2Fbin%2Flinux%2Fx64%2F0.5%2Fjulia-0.5.0-rc4-linux-x86_64.tar.gz&sa=D&sntz=1&usg=AFQjCNHSKje1Ioz9eR1zQU3KvwJa3pU4xw
and expand the file into downloads. Then I open an admin window showing the files, and a second admin window which I use to get to /usr/local. I select all the directories in the julia directory (bin, include, etc ...) and cut them then paste them into the /usr/local window (it asks about merging directories and overwriting files, yes to both). Then at the normal terminal type julia.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #52 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AMHyIlg2kp-2zwk2v5HChjdvobqaPEMxks5qql3OgaJpZM4J7BtJ . https://github.com/notifications/beacon/AMHyIlxjg1dyTmlKGP4prvW9pSc1vFohks5qql3OgaJpZM4J7BtJ.gif

@JeffreySarnoff
Copy link

dunno much about the rest -- do know this

VBoxGuestAdditions which did not work out as intuitively on LinuxMint.
That is because those capabilities are included automatically with the current & most recent versions of VirtualBox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants