Shared array between two julia sessions with different pids

Process 26012:

julia> using SharedArrays

julia> getpid()
26012

julia> sa = SharedVector{Int}(4);

Process 35208:

julia> using SharedArrays

julia> getpid()
35208

Is there an easy way to get sa from process 26012 in process 35208 ?
All processes on one host.

You might benefit from looking at this section in the manual Multi-processing and Distributed Computing · The Julia Language. The separate process need to be worker processes spawned by the main julia process. There is a running example in that section of the manual.

thanks, but two independent sessions is a must

Mmap might help:
https://docs.julialang.org/en/v1/stdlib/Mmap/#Mmap.mmap

2 Likes
using InterProcessCommunication

# then use WrappedArray(...);