Stan not working in JuliaBox

136 views
Skip to first unread message

Christopher Fisher

unread,
Nov 12, 2016, 9:09:59 PM11/12/16
to JuliaBox
Hi all-

I received an error while trying to run Stan on JuliaBox. In the past, Stan was pre-installed. I that still the case? Here is the error I received while trying to run the notebook example for JuliaBox


WARNING: Method definition (::Type{Graphs.KeyVertex})(Int64, #K<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:12 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:16.
WARNING: Method definition (::Type{Graphs.Edge})(Int64, #V<:Any, #V<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:54 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:60.
WARNING: Method definition (::Type{Graphs.ExEdge})(Int64, #V<:Any, #V<:Any, Base.Dict{String, Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:72 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:83.
WARNING: Method definition (::Type{Graphs.TargetIterator})(#G<:Graphs.AbstractGraph, #EList<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:123 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:127.
WARNING: Method definition (::Type{Graphs.SourceIterator})(#G<:Graphs.AbstractGraph, #EList<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:141 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:145.
WARNING: Method definition edge_property_requirement(Graphs.AbstractEdgePropertyInspector{#T<:Any}, Graphs.AbstractGraph{#V<:Any, E<:Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:164 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:179.
WARNING: Method definition vertex_index(#V<:Union{Graphs.ExVertex, Graphs.KeyVertex}, Graphs.GenericGraph{#V<:Union{Graphs.ExVertex, Graphs.KeyVertex}, E<:Any, VList<:Any, EList<:Any, IncList<:Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/graph.jl:65 overwritten at /home/juser/.julia/v0.5/Graphs/src/graph.jl:67.
WARNING: Method definition (::Type{Graphs.GDistanceVisitor})(#G<:Graphs.AbstractGraph, #DMap<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/breadth_first_visit.jl:107 overwritten at /home/juser/.julia/v0.5/Graphs/src/breadth_first_visit.jl:111.
WARNING: Environment variable CMDSTAN_HOME not found. Use set_CMDSTAN_HOME!.

Viral Shah

unread,
Nov 12, 2016, 10:34:04 PM11/12/16
to juli...@googlegroups.com

We probably do not have it preinstalled, but can do that again.

-viral


--
You received this message because you are subscribed to the Google Groups "JuliaBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nishanth Kottary

unread,
Nov 13, 2016, 12:55:36 PM11/13/16
to juli...@googlegroups.com, fish...@miamioh.edu
We do have Stan installed but I think the CMDSTAN_HOME environment variable is not set in notebooks due to some reason.  Will fix this.  As a workaround you can manually set this to '/usr/share/cmdstan' from julia and then try running your code.

Christopher Fisher

unread,
Nov 14, 2016, 7:54:15 AM11/14/16
to JuliaBox, fish...@miamioh.edu
Thank you for your replies. Inserting  ENV["CMDSTAN_HOME"] = "/usr/share/cmdstan" at the top of my script fixed the problem. 

On Sunday, November 13, 2016 at 12:55:36 PM UTC-5, Nishanth Kottary wrote:
We do have Stan installed but I think the CMDSTAN_HOME environment variable is not set in notebooks due to some reason.  Will fix this.  As a workaround you can manually set this to '/usr/share/cmdstan' from julia and then try running your code.
On Sun, Nov 13, 2016 at 9:04 AM, Viral Shah <vi...@mayin.org> wrote:

We probably do not have it preinstalled, but can do that again.

-viral

On Nov 12, 2016 7:09 PM, "Christopher Fisher" <fish...@miamioh.edu> wrote:
Hi all-

I received an error while trying to run Stan on JuliaBox. In the past, Stan was pre-installed. I that still the case? Here is the error I received while trying to run the notebook example for JuliaBox


WARNING: Method definition (::Type{Graphs.KeyVertex})(Int64, #K<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:12 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:16.
WARNING: Method definition (::Type{Graphs.Edge})(Int64, #V<:Any, #V<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:54 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:60.
WARNING: Method definition (::Type{Graphs.ExEdge})(Int64, #V<:Any, #V<:Any, Base.Dict{String, Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:72 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:83.
WARNING: Method definition (::Type{Graphs.TargetIterator})(#G<:Graphs.AbstractGraph, #EList<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:123 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:127.
WARNING: Method definition (::Type{Graphs.SourceIterator})(#G<:Graphs.AbstractGraph, #EList<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:141 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:145.
WARNING: Method definition edge_property_requirement(Graphs.AbstractEdgePropertyInspector{#T<:Any}, Graphs.AbstractGraph{#V<:Any, E<:Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/common.jl:164 overwritten at /home/juser/.julia/v0.5/Graphs/src/common.jl:179.
WARNING: Method definition vertex_index(#V<:Union{Graphs.ExVertex, Graphs.KeyVertex}, Graphs.GenericGraph{#V<:Union{Graphs.ExVertex, Graphs.KeyVertex}, E<:Any, VList<:Any, EList<:Any, IncList<:Any}) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/graph.jl:65 overwritten at /home/juser/.julia/v0.5/Graphs/src/graph.jl:67.
WARNING: Method definition (::Type{Graphs.GDistanceVisitor})(#G<:Graphs.AbstractGraph, #DMap<:Any) in module Graphs at /home/juser/.julia/v0.5/Graphs/src/breadth_first_visit.jl:107 overwritten at /home/juser/.julia/v0.5/Graphs/src/breadth_first_visit.jl:111.
WARNING: Environment variable CMDSTAN_HOME not found. Use set_CMDSTAN_HOME!.

--
You received this message because you are subscribed to the Google Groups "JuliaBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JuliaBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+...@googlegroups.com.

Christopher Fisher

unread,
Nov 14, 2016, 11:50:56 AM11/14/16
to JuliaBox, fish...@miamioh.edu
Strangely, the workaround was a short lived solution for me.  Perhaps there are other issues with the configuration. First, it gave me this error when trying to run the bernoulli example:

make: `/home/juser/.julia/v0.5/Stan/Examples/Bernoulli/tmp/bernoulli' is up to date.

could not spawn `/usr/share/cmdstan/bin/stansummary bernoulli_samples_1.csv bernoulli_samples_2.csv bernoulli_samples_3.csv bernoulli_samples_4.csv`: no such file or directory (ENOENT)

I also encountered and error saying the stan package needed to be rebuilt and to install homebrew, but that resulted in an error too:

INFO: Building Rmath
INFO: Building Cairo
INFO: Building Stan
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/brew.sh: line 48: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Error: uninitialized constant Formulary::FormulaNamespaced18c763c5f152374bb7f97a3e05caa88::Cctools::MacOS
Please report this bug:
  https://github.com/Linuxbrew/brew/wiki/troubleshooting
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Taps/homebrew/homebrew-core/Formula/cctools.rb:5:in `<class:Cctools>'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Taps/homebrew/homebrew-core/Formula/cctools.rb:1:in `load_formula'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:25:in `module_eval'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:25:in `load_formula'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:97:in `load_file'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:88:in `klass'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:84:in `get_formula'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:241:in `factory'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/formulary.rb:406:in `find_with_priority'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/extend/ARGV.rb:45:in `block in formulae'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/extend/ARGV.rb:41:in `map'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/extend/ARGV.rb:41:in `formulae'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/cmd/info.rb:72:in `print_json'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/cmd/info.rb:34:in `info'
/home/juser/.julia/v0.5/Homebrew/deps/usr/Library/Homebrew/brew.rb:94:in `<main>'
================================[ ERROR: Stan ]=================================

LoadError: InitError: ArgumentError: `brew info` failed for String["cctools"]!
during initialization of module Homebrew
while loading /home/juser/.julia/v0.5/Stan/deps/build.jl, in expression starting on line 1

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: Stan had build errors.

 - packages with build errors remain installed in /home/juser/.julia/v0.5
 - build the package(s) and all dependencies with `Pkg.build("Stan")`
 - build a single package by running its `deps/build.jl` script

================================================================================
Reply all
Reply to author
Forward
0 new messages