Hello,

I am having some issues using pmap(). I constructed a basic example that 
illustrates the problem I'm seeing:

*in "partest.jl":*
module MyMod
    type mytype
        a::Float64
        b::Int64
        c::Float64
    end

    function myfun!(a,b,c)
        a.a += b*c
    end

    function mywrapper!(s)
        pmap( x->myfun!(x,1.,1.), s )
    end
end

*In the Julia REPL:*
include("partest.jl")
addprocs(4)
@everywhere using MyMod
v = [MyMod.mytype(randn(i)[1],i,0.) for i = 1:1000];
MyMod.mywrapper!(v);

I expect the elements of v to be changed according to the operation in 
myfun!, but they are not. What am I doing wrong here?

Thanks,
Chris

Reply via email to