Open fiktor opened 11 months ago
Attached are other information which might be relevant to reproduce the bug: gdb trace and the list of installed packages (in plaintext and as environment.yml renamed environment.yml.txt to pass github filetype filter).
It looks like this problem was mentioned in pytorch.#78829: while the issue 78829 is about the order "import torch; import juliacall", the comment cited above says
In the Linux scenario the issue occurs when Julia is loaded before pytorch within the same process.
which is consistent with this issue. Three more observations:
torch/__init__.py
is executed:
198: from torch._C import * # noqa: F403
juliacall
and torch
are loading the same libgomp.so.1juliacall
and torch
but exported by different libraries. Example: juliacall
loads (indirectly) libopenblas64_.so and torch
loads libmkl_gnu_thread.so.2. Both of these two libraries export symbol omp_in_parallel
. I am not sure whether it is related to the segfault.You appear to be using juliacall
which is unrelated to the pyjulia package. I'm going to transfer this issue to https://github.com/JuliaPy/PythonCall.jl
There are a number of possibilities here. You could for example configure Julia to use MKL.
Minimal example:
The segfault happens at 0x00007fffa673c342 in __kmp_env_blk_init () in libgomp.so.1
Importing only one of the two modules does not result in an error.
Note that this issue is related but different from #215: here
juliacall
is imported beforetorch
, and theretorch
is imported beforejuliacall
.Environment details:
1.11.0.post202
(pytorch-gpu, build cuda112py310h68407e5_202)Similar issues:
torch
is imported beforejuliacall
, but not the reverse FAQ