I am trying to build a system image for a package. The system image is built in a different machine than the one that it runs on. For efficiency reasons I want to be able to build for the cpu type of the target which is znver3
.
Unfortunately, the resulting system image is not loadable in the target machine, resulting in:
ERROR: Unable to find compatible target in system image
Here is the versioninfo of the machine that created the system image:
julia> versioninfo()
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 4 Γ Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
Threads: 1 on 4 virtual cores
Environment:
JULIA_GPG = 3673DF529D9049477F76B37566E3C7DC03D6E495
JULIA_VERSION = 1.9.0
JULIA_PATH = /usr/local/julia
and here is the one that is supposed to use it:
julia> versioninfo()
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 Γ AMD EPYC 7B13
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
Threads: 16 on 16 virtual cores
Environment:
JULIA_DEPOT_PATH = /root/.julia
JULIA_NUM_THREADS = auto
Note that znver3
appears when in the output of julia -C help
in both machines.
The code used to create the system image is:
julia -e 'using Pkg; Pkg.add("PackageCompiler")'
julia --project=/my_project/ -e 'using Pkg, PackageCompiler; create_sysimage(["MyPackage"]; sysimage_path="/my_project/sysimage.so", cpu_target="znver3")'
and the code that makes use of it:
julia -J/my_project/sysimage.so --project=/my_project
Any ideas what is going wrong or how can I get more debug information? I can provide a full dockerized example, if thatβs useful.