How to open a dll on multiple workers with Distributed.jl

Hi,

I am trying to open a dll on multiple workers with the following code

using Distributed

addprocs(1)
nprocs() # 2

@everywhere using Libdl
@everywhere p = Libdl.dlopen("libscsdir")

@fetchfrom 1 p # Correct
@fetchfrom 2 p # NULL pointer

The problem with this implementation is that apart from worker 1 all pointers are NULL. Is there another way to load the dll on multiple workers?

In the end I will use the dll to perform some complicated operations possibly in loops.

Link to dll

1 Like