brian-j-smith / Mamba.jl

Markov chain Monte Carlo (MCMC) for Bayesian analysis in julia
Other
254 stars 52 forks source link

failing seeds example #80

Closed axsk closed 8 years ago

axsk commented 8 years ago

including the doc/examples/seeds.jl leads to following error:

ERROR: LoadError: BoundsError: attempt to access 0-element Array{Int64,1}
  at index [1]
 in amwg_sub! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/samplers/amwg.jl:93
 in amwg! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/samplers/amwg.jl:69
 [inlined code] from /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/samplers/amwg.jl:45
 in anonymous at no file:0
 in anonymous at no file
 in simulate! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/model/simulation.jl:119
 in simulate! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/model/simulation.jl:114
 in mcmc_worker! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/model/mcmc.jl:75
 in map at abstractarray.jl:1308
 in mcmc_master! at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/model/mcmc.jl:53
 in mcmc at /datanumerik/bzfsikor/juliapkg/v0.4/Mamba/src/model/mcmc.jl:33
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
while loading /nfs/datanumerik/bzfsikor/juliapkg/v0.4/Mamba/doc/examples/seeds.jl, in expression starting on line 76
bdeonovic commented 8 years ago

I just pulled master branch and it worked just fine for me.

brian-j-smith commented 8 years ago

The seeds example works for me as well. Below is the version information from my julia installation for reference.

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.2 (2015-12-06 21:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-w64-mingw32

julia> Pkg.status()
6 required packages:
 - Cairo                         0.2.31
 - GraphViz                      0.0.4
 - Jewel                         1.0.8
 - Mamba                         0.8.0
 - PDMats                        0.3.6
 - REPLCompletions               0.0.3
49 additional packages:
 - ArrayViews                    0.6.4
 - BinDeps                       0.3.20
 - Calculus                      0.1.14
 - Codecs                        0.1.5
 - ColorTypes                    0.2.0
 - Colors                        0.6.1
 - Compat                        0.7.8
 - Compose                       0.4.0
 - Contour                       0.0.8
 - DataArrays                    0.2.20
 - DataFrames                    0.6.10
 - DataStructures                0.3.13
 - Dates                         0.4.4
 - Distances                     0.2.1
 - Distributions                 0.8.7
 - Docile                        0.5.20
 - DualNumbers                   0.1.5
 - FactCheck                     0.4.2
 - FixedPointNumbers             0.1.1
 - GZip                          0.2.18
 - Gadfly                        0.4.0
 - Graphics                      0.1.3
 - Graphs                        0.6.0
 - Grid                          0.4.0
 - Hexagons                      0.0.4
 - ImmutableArrays               0.0.11
 - Iterators                     0.1.9
 - JSON                          0.5.0
 - JuliaParser                   0.6.4
 - KernelDensity                 0.1.2
 - LNR                           0.0.2
 - Lazy                          0.10.1
 - LibExpat                      0.1.0
 - Loess                         0.0.6
 - MacroTools                    0.2.0
 - Measures                      0.0.1
 - NaNMath                       0.1.1
 - Optim                         0.4.4
 - Reexport                      0.0.3
 - Requires                      0.2.1
 - SHA                           0.1.2
 - Showoff                       0.0.6
 - SortingAlgorithms             0.0.6
 - StatsBase                     0.7.4
 - StatsFuns                     0.2.0
 - URIParser                     0.1.2
 - WinRPM                        0.1.13
 - WoodburyMatrices              0.1.3
 - Zlib                          0.1.12
axsk commented 8 years ago

Excuse the fuzz. This was cause by a change in my Mamba fork, which I had forgotten about. Seems like my proposal to simply remove the tune field reset on first iteration breaks some samplers.