pyjulia
pyjulia copied to clipboard
`ReadOnlyMemoryError()` when creating Julia objects in multiple sub-processes using PyJulia.
I have a program that spawns a large number of sub-processes and each sub-process is having its own Julia object created using pyjulia and diffeqpy. It works fine for around 50 sub-processes, but after that, I get these errors. The following is the stack trace from one of the sub-processes.
Can anybody suggest a potential cause of the ReadOnlyMemoryError()? I tried both 0,5.6 and 0.5.7 versions of PyJulia.
Internal error: encountered unexpected error in runtime:
ReadOnlyMemoryError()
reset_page at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1145 [inlined]
add_page at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1177
jl_gc_pool_alloc at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1230
UseRef at .\compiler/ssair\ir.jl:263 [inlined]
UseRefIterator at .\compiler/ssair\ir.jl:268 [inlined]
userefs at .\compiler/ssair\ir.jl:382 [inlined]
scan_entry! at .\compiler/ssair\slot2ssa.jl:27
scan_slot_def_use at .\compiler/ssair\slot2ssa.jl:56
slot2reg at .\compiler/ssair\driver.jl:126 [inlined]
run_passes at .\compiler/ssair\driver.jl:134
optimize at .\compiler\optimize.jl:174
typeinf at .\compiler\typeinfer.jl:33