[julia-users] Re: copy a local variable to all parallel workers

2015-10-31 Thread Andre Bieler
Thanks for the clarification. How do I make it available to pfunc.showData then? (without having to explicitly send it as an argument in the function call) The goal would be to have a large chunk of data having locally available to the workers which then can independently work on it and only sen

[julia-users] Re: copy a local variable to all parallel workers

2015-10-31 Thread Jonathan Malmaud
The method 'pfunc.showData' isn't able to see the variable `data`, which exists as a global variable in the worker's 'Main' module, not it's 'pfuncs' module. On Saturday, October 31, 2015 at 12:14:34 AM UTC-5, Andre Bieler wrote: > > I have a similar question about getting data to all workers.

[julia-users] Re: copy a local variable to all parallel workers

2015-10-30 Thread Andre Bieler
I have a similar question about getting data to all workers. Consider the following code: ''' addprocs(2) using pfuncs #= @everywhere function showData() @show(data) end =# function pstep() @sync begin for p in workers() @async begin remotecall_fetch(p, showData)