Gadfly in userimg.jl

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Gadfly in userimg.jl

Joshua Job
Hello all,

Is there anyone else who has attempted to precompile Gadfly using userimg.jl? It keeps claiming that the variable STD_ variables (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty common/general issue (it also comes up when trying to precompile HDF5, etc.). I've pulled the load time on Gadfly down to about 15 seconds by precompiling DataFrames, but it'd be really nice if I could just put "using My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30 second startup time for a new instance of Julia.

I'm wondering if a) is this an issue only I have and b) if not, is there some way to make it so the STD_ variables are all defined prior to running/compiling userimg.jl?
Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Matt Bauman
I believe the trouble you're running into is that not all packages are precompile-friendly.  While Gadfly by itself is, it dynamically tries to load other packages if they exist.  I've run into this trouble when I have some JuMP packages installed.  In my case, I fixed it by changing the following in Compose.jl:

diff --git a/src/table.jl b/src/table.jl
index d66d88b..bbbfa31 100644
--- a/src/table.jl
+++ b/src/table.jl
@@ -369,7 +369,7 @@ function realize_brute_force(tbl::Table, drawctx::ParentDrawContext)
 end


-if Pkg.installed("JuMP") != nothing &&
+if false && Pkg.installed("JuMP") != nothing &&
     (Pkg.installed("GLPKMathProgInterface") != nothing ||
      Pkg.installed("Cbc") != nothing)
     include("table-jump.jl")

On Friday, December 12, 2014 9:47:56 PM UTC-5, Joshua Job wrote:
Hello all,

Is there anyone else who has attempted to precompile Gadfly using userimg.jl? It keeps claiming that the variable STD_ variables (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty common/general issue (it also comes up when trying to precompile HDF5, etc.). I've pulled the load time on Gadfly down to about 15 seconds by precompiling DataFrames, but it'd be really nice if I could just put "using My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30 second startup time for a new instance of Julia.

I'm wondering if a) is this an issue only I have and b) if not, is there some way to make it so the STD_ variables are all defined prior to running/compiling userimg.jl?
Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Tim Holy
In reply to this post by Joshua Job
HDF5 _should_ work---I just put in a bunch of work to fix some problems that
were preventing precompilation. But, you must be using HDF5 0.4.7 (or master).

--Tim


On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:

> Hello all,
>
> Is there anyone else who has attempted to precompile Gadfly using
> userimg.jl? It keeps claiming that the variable STD_ variables
> (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> common/general issue (it also comes up when trying to precompile HDF5,
> etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> precompiling DataFrames, but it'd be really nice if I could just put "using
> My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> second startup time for a new instance of Julia.
>
> I'm wondering if a) is this an issue only I have and b) if not, is there
> some way to make it so the STD_ variables are all defined prior to
> running/compiling userimg.jl?

Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Joshua Job
I'm on Mac OS X, but I get an error from HDF5 calling/pulling in the Homebrew package with 

error during bootstrap: LoadError(at "sysimg.jl" line 286: LoadError(at "/Users/joshuajob/julia-0.3/base/userimg.jl" line 1: LoadError(at "/Users/joshuajob/.julia/v0.3/HDF5/src/HDF5.jl" line 1: LoadError(at "/Users/joshuajob/.julia/v0.3/HDF5/src/plain.jl" line 14: LoadError(at "/Users/joshuajob/.julia/v0.3/Homebrew/src/Homebrew.jl" line 345: UndefVarError(var=:STDERR))))))

 It probably would work fine if I was on Linux.

On Friday, December 12, 2014 11:21:39 PM UTC-5, Tim Holy wrote:
HDF5 _should_ work---I just put in a bunch of work to fix some problems that
were preventing precompilation. But, you must be using HDF5 0.4.7 (or master).

--Tim


On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:

> Hello all,
>
> Is there anyone else who has attempted to precompile Gadfly using
> userimg.jl? It keeps claiming that the variable STD_ variables
> (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> common/general issue (it also comes up when trying to precompile HDF5,
> etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> precompiling DataFrames, but it'd be really nice if I could just put "using
> My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> second startup time for a new instance of Julia.
>
> I'm wondering if a) is this an issue only I have and b) if not, is there
> some way to make it so the STD_ variables are all defined prior to
> running/compiling userimg.jl?

Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Miles Lubin
In reply to this post by Matt Bauman
I've been able to successfully precompile JuMP. What issues were you running into?

On Friday, December 12, 2014 10:16:27 PM UTC-5, Matt Bauman wrote:
I believe the trouble you're running into is that not all packages are precompile-friendly.  While Gadfly by itself is, it dynamically tries to load other packages if they exist.  I've run into this trouble when I have some JuMP packages installed.  In my case, I fixed it by changing the following in Compose.jl:

diff --git a/src/table.jl b/src/table.jl
index d66d88b..bbbfa31 100644
--- a/src/table.jl
+++ b/src/table.jl
@@ -369,7 +369,7 @@ function realize_brute_force(tbl::Table, drawctx::ParentDrawContext)
 end


-if Pkg.installed("JuMP") != nothing &&
+if false && Pkg.installed("JuMP") != nothing &&
     (Pkg.installed("GLPKMathProgInterface") != nothing ||
      Pkg.installed("Cbc") != nothing)
     include("table-jump.jl")

On Friday, December 12, 2014 9:47:56 PM UTC-5, Joshua Job wrote:
Hello all,

Is there anyone else who has attempted to precompile Gadfly using userimg.jl? It keeps claiming that the variable STD_ variables (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty common/general issue (it also comes up when trying to precompile HDF5, etc.). I've pulled the load time on Gadfly down to about 15 seconds by precompiling DataFrames, but it'd be really nice if I could just put "using My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30 second startup time for a new instance of Julia.

I'm wondering if a) is this an issue only I have and b) if not, is there some way to make it so the STD_ variables are all defined prior to running/compiling userimg.jl?
Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Tim Holy
In reply to this post by Joshua Job
If you'd like some help fixing this, please open an issue over at HDF5.jl. If
you do, please be explicit about the commands you're executing that lead to
such error messages.

--Tim

On Tuesday, December 16, 2014 11:12:58 AM Joshua Job wrote:

> I'm on Mac OS X, but I get an error from HDF5 calling/pulling in the
> Homebrew package with
>
> > error during bootstrap: LoadError(at "sysimg.jl" line 286: LoadError(at
> > "/Users/joshuajob/julia-0.3/base/userimg.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/HDF5.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/plain.jl" line 14: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/Homebrew/src/Homebrew.jl" line 345:
> > UndefVarError(var=:STDERR))))))
>
>  It probably would work fine if I was on Linux.
>
> On Friday, December 12, 2014 11:21:39 PM UTC-5, Tim Holy wrote:
> > HDF5 _should_ work---I just put in a bunch of work to fix some problems
> > that
> > were preventing precompilation. But, you must be using HDF5 0.4.7 (or
> > master).
> >
> > --Tim
> >
> > On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:
> > > Hello all,
> > >
> > > Is there anyone else who has attempted to precompile Gadfly using
> > > userimg.jl? It keeps claiming that the variable STD_ variables
> > > (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> > > common/general issue (it also comes up when trying to precompile HDF5,
> > > etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> > > precompiling DataFrames, but it'd be really nice if I could just put
> >
> > "using
> >
> > > My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> > > second startup time for a new instance of Julia.
> > >
> > > I'm wondering if a) is this an issue only I have and b) if not, is there
> > > some way to make it so the STD_ variables are all defined prior to
> > > running/compiling userimg.jl?

Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Shashi Gowda


@Joshua, if you do Pkg.update() and get the latest Gadfly, you should be able to precompile it.


Homebrew.jl had a new release 5 hours ago as well, did you try updating? We were getting the UndefVarError(var=:STDERR) with Compose, this happens when the code you are loading wants to print an error message (I think). Does `using HDF5` work for you if you build without precompiling? You should not have any load time errors for this to work.

I was able to fix Compose precompilation problem by accounting for the error case https://github.com/JuliaLang/JuliaBox/issues/123#issuecomment-67187273

On Wed, Dec 17, 2014 at 7:58 AM, Tim Holy <[hidden email]> wrote:
If you'd like some help fixing this, please open an issue over at HDF5.jl. If
you do, please be explicit about the commands you're executing that lead to
such error messages.

--Tim

On Tuesday, December 16, 2014 11:12:58 AM Joshua Job wrote:
> I'm on Mac OS X, but I get an error from HDF5 calling/pulling in the
> Homebrew package with
>
> > error during bootstrap: LoadError(at "sysimg.jl" line 286: LoadError(at
> > "/Users/joshuajob/julia-0.3/base/userimg.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/HDF5.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/plain.jl" line 14: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/Homebrew/src/Homebrew.jl" line 345:
> > UndefVarError(var=:STDERR))))))
>
>  It probably would work fine if I was on Linux.
>
> On Friday, December 12, 2014 11:21:39 PM UTC-5, Tim Holy wrote:
> > HDF5 _should_ work---I just put in a bunch of work to fix some problems
> > that
> > were preventing precompilation. But, you must be using HDF5 0.4.7 (or
> > master).
> >
> > --Tim
> >
> > On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:
> > > Hello all,
> > >
> > > Is there anyone else who has attempted to precompile Gadfly using
> > > userimg.jl? It keeps claiming that the variable STD_ variables
> > > (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> > > common/general issue (it also comes up when trying to precompile HDF5,
> > > etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> > > precompiling DataFrames, but it'd be really nice if I could just put
> >
> > "using
> >
> > > My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> > > second startup time for a new instance of Julia.
> > >
> > > I'm wondering if a) is this an issue only I have and b) if not, is there
> > > some way to make it so the STD_ variables are all defined prior to
> > > running/compiling userimg.jl?

Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Joshua Job
HDF5 works fine if I don't try to precompile it. And now Gadfly works great! Which is really fantastic as that was, by a longshot, the biggest problem slowdown in getting to work with a new Julia instance. Thanks so much!

I'm not too worried about HDF5, as it only takes a couple seconds to load. I'll try playing around with it myself a bit and if I can't figure it out I'll file an issue.



On Tuesday, December 16, 2014 11:08:05 PM UTC-5, Shashi Gowda wrote:


@Joshua, if you do Pkg.update() and get the latest Gadfly, you should be able to precompile it.


Homebrew.jl had a new release 5 hours ago as well, did you try updating? We were getting the UndefVarError(var=:STDERR) with Compose, this happens when the code you are loading wants to print an error message (I think). Does `using HDF5` work for you if you build without precompiling? You should not have any load time errors for this to work.

I was able to fix Compose precompilation problem by accounting for the error case <a href="https://github.com/JuliaLang/JuliaBox/issues/123#issuecomment-67187273" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2FJuliaLang%2FJuliaBox%2Fissues%2F123%23issuecomment-67187273\46sa\75D\46sntz\0751\46usg\75AFQjCNGA5xLwaPntUB9cOXGlAx3EQ2u-Ag';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2FJuliaLang%2FJuliaBox%2Fissues%2F123%23issuecomment-67187273\46sa\75D\46sntz\0751\46usg\75AFQjCNGA5xLwaPntUB9cOXGlAx3EQ2u-Ag';return true;">https://github.com/JuliaLang/JuliaBox/issues/123#issuecomment-67187273

On Wed, Dec 17, 2014 at 7:58 AM, Tim Holy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q8gtyKejC7gJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">tim....@...> wrote:
If you'd like some help fixing this, please open an issue over at HDF5.jl. If
you do, please be explicit about the commands you're executing that lead to
such error messages.

--Tim

On Tuesday, December 16, 2014 11:12:58 AM Joshua Job wrote:
> I'm on Mac OS X, but I get an error from HDF5 calling/pulling in the
> Homebrew package with
>
> > error during bootstrap: LoadError(at "sysimg.jl" line 286: LoadError(at
> > "/Users/joshuajob/julia-0.3/base/userimg.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/HDF5.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/plain.jl" line 14: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/Homebrew/src/Homebrew.jl" line 345:
> > UndefVarError(var=:STDERR))))))
>
>  It probably would work fine if I was on Linux.
>
> On Friday, December 12, 2014 11:21:39 PM UTC-5, Tim Holy wrote:
> > HDF5 _should_ work---I just put in a bunch of work to fix some problems
> > that
> > were preventing precompilation. But, you must be using HDF5 0.4.7 (or
> > master).
> >
> > --Tim
> >
> > On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:
> > > Hello all,
> > >
> > > Is there anyone else who has attempted to precompile Gadfly using
> > > userimg.jl? It keeps claiming that the variable STD_ variables
> > > (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> > > common/general issue (it also comes up when trying to precompile HDF5,
> > > etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> > > precompiling DataFrames, but it'd be really nice if I could just put
> >
> > "using
> >
> > > My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> > > second startup time for a new instance of Julia.
> > >
> > > I'm wondering if a) is this an issue only I have and b) if not, is there
> > > some way to make it so the STD_ variables are all defined prior to
> > > running/compiling userimg.jl?

Reply | Threaded
Open this post in threaded view
|

Re: Gadfly in userimg.jl

Todd Leo
In reply to this post by Shashi Gowda
Hi Shashi, 

I have encoutered errors on building julia with Base.require("Gadfly") in userimg:

LoadError(at "sysimg.jl" line 319: LoadError(at "/home/todd/workspace/julia/base/userimg.jl" line 2: LoadError(at "/home/todd/.julia/v0.4/Gadfly/src/Gadfly.jl" line 1054: LoadError(at "/home/todd/.julia/v0.4/Gadfly/src/statistics.jl" line 15: LoadError(at "/home/todd/.julia/v0.4/KernelDensity/src/KernelDensity.jl" line 5: LoadError(at  line : ))))))
rec_backtrace at
/home/todd/workspace/julia/usr/bin/../lib/libjulia.so (unknown line)
jl_throw at
/home/todd/workspace/julia/usr/bin/../lib/libjulia.so (unknown line)
jl_undefined_var_error at
/home/todd/workspace/julia/usr/bin/../lib/libjulia.so (unknown line)
warn at util
.jl:255
julia_warn_24380 at  
(unknown line)
depwarn at deprecated
.jl:42
...
...some more errors
...


 
I have checked out the latest version of Cairo.jl, and updated all other packages. Any thoughts to this? Thanks!

On Wednesday, December 17, 2014 at 12:08:05 PM UTC+8, Shashi Gowda wrote:


@Joshua, if you do Pkg.update() and get the latest Gadfly, you should be able to precompile it.


Homebrew.jl had a new release 5 hours ago as well, did you try updating? We were getting the UndefVarError(var=:STDERR) with Compose, this happens when the code you are loading wants to print an error message (I think). Does `using HDF5` work for you if you build without precompiling? You should not have any load time errors for this to work.

I was able to fix Compose precompilation problem by accounting for the error case <a href="https://github.com/JuliaLang/JuliaBox/issues/123#issuecomment-67187273" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2FJuliaLang%2FJuliaBox%2Fissues%2F123%23issuecomment-67187273\46sa\75D\46sntz\0751\46usg\75AFQjCNGA5xLwaPntUB9cOXGlAx3EQ2u-Ag';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2FJuliaLang%2FJuliaBox%2Fissues%2F123%23issuecomment-67187273\46sa\75D\46sntz\0751\46usg\75AFQjCNGA5xLwaPntUB9cOXGlAx3EQ2u-Ag';return true;">https://github.com/JuliaLang/JuliaBox/issues/123#issuecomment-67187273

On Wed, Dec 17, 2014 at 7:58 AM, Tim Holy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q8gtyKejC7gJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">tim....@...> wrote:
If you'd like some help fixing this, please open an issue over at HDF5.jl. If
you do, please be explicit about the commands you're executing that lead to
such error messages.

--Tim

On Tuesday, December 16, 2014 11:12:58 AM Joshua Job wrote:
> I'm on Mac OS X, but I get an error from HDF5 calling/pulling in the
> Homebrew package with
>
> > error during bootstrap: LoadError(at "sysimg.jl" line 286: LoadError(at
> > "/Users/joshuajob/julia-0.3/base/userimg.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/HDF5.jl" line 1: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/HDF5/src/plain.jl" line 14: LoadError(at
> > "/Users/joshuajob/.julia/v0.3/Homebrew/src/Homebrew.jl" line 345:
> > UndefVarError(var=:STDERR))))))
>
>  It probably would work fine if I was on Linux.
>
> On Friday, December 12, 2014 11:21:39 PM UTC-5, Tim Holy wrote:
> > HDF5 _should_ work---I just put in a bunch of work to fix some problems
> > that
> > were preventing precompilation. But, you must be using HDF5 0.4.7 (or
> > master).
> >
> > --Tim
> >
> > On Friday, December 12, 2014 06:47:55 PM Joshua Job wrote:
> > > Hello all,
> > >
> > > Is there anyone else who has attempted to precompile Gadfly using
> > > userimg.jl? It keeps claiming that the variable STD_ variables
> > > (STDIN,STDOUT,STDERR) are not defined, and this seems to be a pretty
> > > common/general issue (it also comes up when trying to precompile HDF5,
> > > etc.). I've pulled the load time on Gadfly down to about 15 seconds by
> > > precompiling DataFrames, but it'd be really nice if I could just put
> >
> > "using
> >
> > > My,Most,Used,Packages" unto my juliarc.jl file and not have a solid 30
> > > second startup time for a new instance of Julia.
> > >
> > > I'm wondering if a) is this an issue only I have and b) if not, is there
> > > some way to make it so the STD_ variables are all defined prior to
> > > running/compiling userimg.jl?