Search code examples
juliadistributed-computing

How can i fix Julia error?


I am using Julia version 0.5.2.

julia> addprocs(4);
julia> a=rand(8,8);
julia> distribute(a,2)

When I try to use this codes,I get the error:

ERROR: UndefVarError: distribute not defined

How do i must do?

thanks in advance.


Solution

  • You need to add the DistributedArrays.jl package.

    Pkg.add("DistributedArrays"); using DistributedArrays