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

MethodError: start has no method matching start(::Type{Int64}) #25

Closed
dpo opened this issue Apr 22, 2015 · 16 comments
Closed

MethodError: start has no method matching start(::Type{Int64}) #25

dpo opened this issue Apr 22, 2015 · 16 comments

Comments

@dpo
Copy link

dpo commented Apr 22, 2015

The error below is probably due to a very recent change; it didn't happen with 0.4.0-dev+4294 (commit b7d7955):

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http:https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+4460 (2015-04-22 21:32 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 3bbc5fc (0 days old master)
|__/                   |  x86_64-apple-darwin13.4.0

julia> using DistributedArrays
ERROR: LoadError: MethodError: `start` has no method matching start(::Type{Int64})
 in append_any at base.jl:198
 in include at /Applications/Julia-0.4.0-dev-3bbc5fc0d0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0-dev-3bbc5fc0d0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in reload_path at /Applications/Julia-0.4.0-dev-3bbc5fc0d0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in _require at /Applications/Julia-0.4.0-dev-3bbc5fc0d0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in require at /Applications/Julia-0.4.0-dev-3bbc5fc0d0.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/dpo/.julia/v0.4/DistributedArrays/src/DistributedArrays.jl, in expression starting on line 319
@gvdr
Copy link

gvdr commented Apr 27, 2015

Got the same...

@andreasnoack
Copy link
Member

Have you run Pkg.update()?

@gvdr
Copy link

gvdr commented Apr 27, 2015

Wop, actually error solved after Pkg.checkout("DistributedArrays").

@andreasnoack
Copy link
Member

What do you get from versioninfo()?

@gvdr
Copy link

gvdr commented Apr 27, 2015

Here we are:

Julia Version 0.4.0-dev+4532
Commit 0398bb2 (2015-04-27 16:10 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2667 0 @ 2.90GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

@andreasnoack
Copy link
Member

...and Pkg.status()?

@gvdr
Copy link

gvdr commented Apr 27, 2015

The whole list is:

10 required packages:
 - DistributedArrays             0.1.0+             master
 - GLM                           0.4.6
 - Gadfly                        0.3.11+            master
 - Graphs                        0.5.4
 - IJulia                        0.2.3
 - Optim                         0.4.1
 - PTools                        0.0.0+             master
 - PyCall                        0.8.0+             master
 - PyPlot                        1.5.3
 - RDatasets                     0.1.2
41 additional packages:
 - ArrayViews                    0.6.1
 - BinDeps                       0.3.11
 - Calculus                      0.1.7
 - Codecs                        0.1.4
 - Color                         0.4.4
 - Compat                        0.4.2
 - Compose                       0.3.11
 - Contour                       0.0.6
 - DataArrays                    0.2.13
 - DataFrames                    0.6.4
 - DataStructures                0.3.8
 - Dates                         0.4.4
 - Distances                     0.2.0
 - Distributions                 0.7.1
 - Docile                        0.4.11
 - DualNumbers                   0.1.3
 - FixedPointNumbers             0.0.7
 - GZip                          0.2.15
 - Graphics                      0.1.0
 - Grid                          0.3.8
 - Hexagons                      0.0.3
 - ImmutableArrays               0.0.7
 - Iterators                     0.1.7
 - JSON                          0.4.3
 - KernelDensity                 0.1.0
 - LaTeXStrings                  0.1.2
 - Loess                         0.0.3
 - NaNMath                       0.0.2
 - Nettle                        0.1.8
 - NumericFuns                   0.2.3
 - PDMats                        0.3.3
 - REPLCompletions               0.0.3
 - RandomGraphs                  0.0.0-             master (unregistered)
 - Reexport                      0.0.2
 - SHA                           0.0.4
 - Showoff                       0.0.4
 - SortingAlgorithms             0.0.4
 - StatsBase                     0.6.14
 - URIParser                     0.0.5
 - WoodburyMatrices              0.0.1
 - ZMQ                           0.1.17

@gvdr
Copy link

gvdr commented Apr 27, 2015

I'm trying to use it, to see how it runs. So far almost so good (almost):

julia> dzeros((100,100), workers()[1:4], [1,4])
ERROR: MethodError: `dzeros` has no method matching dzeros(::Tuple{Int64,Int64}, ::Array{Int64,1}, ::Array{Int64,1})
Closest candidates are:
  dzeros{T}(::Type{T}, ::Tuple{Vararg{Int64}}, ::Any...)
  dzeros(::Tuple{Vararg{Int64}})

@andreasnoack
Copy link
Member

Try

dzeros(Float64, (100,100), workers()[1:4], [1,4])

It has just been changed, but I think we should default to Float64.

@gvdr
Copy link

gvdr commented Apr 27, 2015

Runs smoothly.

@gvdr
Copy link

gvdr commented Apr 28, 2015

By the side, I'm discovering DistributedArrays after trying to implement something akin to the archetypical problem (mentioned in http:https://julia.readthedocs.org/en/latest/manual/parallel-computing/):

a = zeros(100000)
@parallel for i=1:100000
  a[i] = i
end

and being informed that DArrays is the way to go. So, what would the DArrays approach be?

P.S. Sorry for the off topic, if there is a better place to discuss this please let me know.

@andreasnoack
Copy link
Member

I think questions like these fits well on the Julia-users list, but see my reply below anyway.

I think it depends on what you are calculating. If you are running a heavy simulation that you'd like to execute in parallel, while the result can just be processed on the master process, I'd just use something like

@parallel (vcat) for i = 1:100000
1+2+3+i
end

or collect the simulation in a function, say simfun and run

r = pmap(simfun, 1:100000)

In other cases a DArray might be useful. Recently mapslices was extended to work for DArrays so you can do something like

julia> A = drandn((10,10,5000), workers(), [1,1,4]);

julia> mapslices(inv, A, (1,2));

to invert each of the 5000 10x10 matrices in the array.

@gvdr
Copy link

gvdr commented Apr 28, 2015

👍

Thanks, the mapslices is perfect for my applications, but all the other examples are much useful.

@jakebolewski
Copy link
Member

@gvdr I added the missing defaults for dzeros / dones so your above example should work now.

@dpo
Copy link
Author

dpo commented Apr 30, 2015

Any idea when the fix will appear in stable?

@jakebolewski
Copy link
Member

This package is currently only works for 0.4-dev, so I don't think it makes sense to tag a new release until 0.4 is released.

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

4 participants