Cannot use shared library with Distributed.jl
Julia Programming Language
Cannot use shared library with Distributed.jl
Hi, I’m trying to use a shared library in a pmap call from Distributed.jl, but can’t seem to make it work. MWE: A file mylib.c with this: #include <stdio.h> int say_y(int y) { printf("Hello from C: got y = %d.\n", y); return y*2; } and the julia code: using Distributed, Libdl addprocs() run(`gcc -fPIC -shared -o mylib.so mylib.c`) @everywhere function get_dlhandler() lib = Libdl.dlopen(joinpath(@__DIR__, "mylib.so")) symbol = Libdl.dlsym(lib, :say_y) return (lib, symb...
0 comments
No comments yet.