0
votes

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.

1
Are you trying to use DistributedArrays? Then you need to add the package: Pkg.add("DistributedArrays"); using DistributedArrays. - Chris Rackauckas
@ChrisRackauckas yes, but i didn't know which package must be add. thank you. - Armaa
@ChrisRackauckas i add this package but get same error! why? - Armaa

1 Answers

6
votes

You need to add the DistributedArrays.jl package.

Pkg.add("DistributedArrays"); using DistributedArrays