thr, your solution of writing a Julia wrapper worked for me. thank you. i
wouldn't have thought of that. how did you think to do that, by the way?
On Sunday, December 6, 2015 at 5:57:24 PM UTC-8, Yakir Gagnon wrote:
>
> OMG I went through so much round about ways to avoid that error...
>
OMG I went through so much round about ways to avoid that error... This
would be amazing if it works!!! Thanks!
Yakir Gagnon
The Queensland Brain Institute (Building #79)
The University of Queensland
Brisbane QLD 4072
Australia
cell +61 (0)424 393 332
work +61 (0)733 654 089
On Mon, Dec 7,
I think I found a way to use pycall in parallel:
To get around the "cannot serialize pointer problem", I declared the corpus
delicti everywhere and wrapped it inside a julia function that is also
declared everywhere:
It's also kind of clumsy and I'm not sure if it applies to your problem,
but t
OK, I found a horrible work around that might be good enough (for me):
Here is a mock python script:
import math, time
x = math.sin(math.pi/4)
time.sleep(5) # mock local work
print(x) # spit it out to julia
and here is the julia code that runs it:
r = @spawn readall(`python example.py`)
sleep(
So I got something working for my pylab example.
julia> import PyCall
julia> PyCall.@pyimport pylab
julia> @everywhere import PyCall
julia> @everywhere PyCall.@pyimport pylab
julia> @everywhere A = pylab.cumsum(collect(1:10))*1.
julia> fetch(@spawnat remotes[1] A)
10-element Array{Float64,1
@Matthew: did you find a solution?
On Tuesday, October 27, 2015 at 8:44:53 AM UTC+10, Yakir Gagnon wrote:
>
> Yea, right? So what’s the answer? How can we if at all do any PyCalls
> parallely?
>
> On Monday, October 26, 2015 at 11:49:35 PM UTC+10, Matthew Pearce wrote:
>
> Thought I had an ide
Yea, right? So what’s the answer? How can we if at all do any PyCalls
parallely?
On Monday, October 26, 2015 at 11:49:35 PM UTC+10, Matthew Pearce wrote:
Thought I had an idea about this, I was wrong:
>
> ```julia
>
> julia> @everywhere using PyCall
>
> julia> @everywhere @pyimport pylab
>
>
Thought I had an idea about this, I was wrong:
```julia
julia> @everywhere using PyCall
julia> @everywhere @pyimport pylab
julia> remotecall_fetch(pylab.cumsum, 5, collect(1:10))
ERROR: cannot serialize a pointer
[inlined code] from error.jl:21
in serialize at serialize.jl:420
[inlined code]