"Shared Array on remote machines" just seemed like an oxymoron..

I didn't read though the code, if you have your machine and another remote 
one you can't have shared memory between (then you would need something 
else, non-shared/message passing). I hope that is not what you are trying 
to do. I assume you are trying to have two (or more) processes on a remote 
machine sharing memory. I don't know a reason it shouldn't work within any 
one machine (just never with an outside machine), maybe there are 
limitations or workarounds.


On Thursday, October 15, 2015 at 4:27:39 PM UTC, Matthew Pearce wrote:
>
> I was wondering if it was possible to spawn shared arrays on remote 
> machines.
>
>
> *julia> S = SharedArray(Int, (3,4), init = S -> S[localindexes(S)] = 
> myid(), pids=Int[1,2])*
>
>
> *3x4 SharedArray{Int64,2}: 1  1  2  2 1  1  2  2 1  1  2  2*
>
>
> *julia> remotecall_fetch(readall, 6, `hostname`)**"mrc-bsu-tesla4\n"*
>
>
> *julia> remotecall_fetch(readall, 7, `hostname`)**"mrc-bsu-tesla4\n"*
>
> *julia> r = @spawnat 6 S = SharedArray(Int, (3,4), init = S -> 
> S[localindexes(S)] = myid(), pids=Int[6,7])*
> *RemoteRef{Channel{Any}}(6,1,526)*
>
> *julia> fetch(r)*
>
>
>
> *3x4 SharedArray{Int64,2}: #undef  #undef  #undef  #undef #undef  #undef  
> #undef  #undef #undef  #undef  #undef  #undef*
>
> Am I simply trying the wrong thing, or am I missing something deeper? 
>
> I thought the error might be from trying to access memory on another 
> process in some unusual way, but:
>
> *julia> r = @spawnat 6 S*eye(4)*
> *RemoteRef{Channel{Any}}(6,1,542)*
>
> *julia> fetch(r)*
>
> *ERROR: On worker 6:UndefRefError: access to undefined reference*
>
> To me this looks like the SharedArray being undefined even from the 
> perspective of process 6.
>
> Cheers,
>
> Matthew
>

Reply via email to