Hi.

Yes, exactly the same with pmap()

Silly example:

addprocs(3)

@everywhere Test(i)
     println(myid())
end

i=1:1000;
pmap(Test,i)

if you do not use @everywhere, it will not work.



On Saturday, April 9, 2016 at 5:14:05 PM UTC-3, Jhan Jar wrote:
>
> Would it also work for pmap()? I don't have any @parallel loops.
>
> On Sunday, April 10, 2016 at 12:39:25 AM UTC+5, Eduardo Lenz wrote:
>>
>> Hi.
>>
>> Use include("file.jl")  and add @everywhere in front of the definition of 
>> every function to be used inside the @parallel loop.
>>
>> []´s
>>
>> On Saturday, April 9, 2016 at 12:02:02 PM UTC-3, Jhan Jar wrote:
>>>
>>> Hi, 
>>>
>>> In Julia 0.3.5, the following loaded the data and code/functions on all 
>>> workers:
>>>
>>> addprocs(3)
>>> require("data_loading_script.jl")
>>> require("functions.jl")
>>>
>>> Now, Julia 0.4.5 warns about deprecation of require and suggests 
>>> switching to 'using' or 'import'.
>>>
>>> What is the equivalent in Julia 0.4.5 for the above three lines that 
>>> worked fine in Julia 0.3.x?
>>>
>>>

Reply via email to