I have a very simple parallel problem but I'm having a hard time executing what 
I want. I'm basically just filling up a large array with @parallel as follows: 

addprocs(10)
require("functions.jl")
biglist = @parallel (vcat) for k=1:procs
        smalllist(args1, args2,...)
end

smalllist (defined in functions.jl) returns an Vector{Float64} and I'm just 
stacking them together to make biglist. My problem is that I can't seem to get 
args1 and args2 to the other processors. I would like something like put! but I 
don't have a RemoteRef to send it to. I've also thought about defining args1, 
args2 etc in functions.jl but (a) it's an unnatural place to put these 
definitions and (b) in the construction of args1, args2 I make calls to rand() 
and I'm worried args1, args2 will be different for each processor. I've tried 
@everywhere but there is a lot of code going into the construction of args1, 
args2 and I don't want 100 lines of code with @everywhere sending all the 
unnecessary temporary variables to each proc. I guess I'm looking for something 
like

@shareall args1, args2, ...
or
@sendall  args1, args2, ...

Any help would me much appreciated. BTW: it would be especially nice if I 
didn't have to send args1, args2 at all, just make them visible  with shared 
memory. 

Reply via email to