PackageCompile system image for different computers

I’ll like to compile a system image that I can use on our in-house compute cluster.

My problem is that the image I build on one computer, will not load on an other.

I have build a system image on my laptop using this command:

julia> create_sysimage(:Revise, sysimage_path="sys_1.5.0.so")
[ Info: PackageCompiler: creating system image object file, this might take a while...
julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

The image loads fine on this machine.

Then I try to load it on a broadwell Xeon server:

julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, broadwell)

and it fails:

$ julia -Jsys_1.5.0.so
ERROR: Unable to find compatible target in system image.
$ ls -l sys_1.5.0.so
-rwxrwxr-x 1 tp datashare 160964776 Aug 17 14:35 sys_1.5.0.so

Is there a way to build a “generic” system image that will run on any Linux x86_64 machine (like the original julia image I download from julialang.org)?

related thread:

TLDR: something like this should give you the same kind of portability as official julia images:

create_sysimage(..., cpu_target="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)")
2 Likes

I am going to be provocative here - not rude I stress.
Why not build an optimised image for your in house cluster? You know the architecture there and surely you want the best performance?
Don’t worry - I do understand why a generic sysimage is useful.
This discussion arises often in the case of containerised/cloud computing versus ‘traditional’ HPC. the traditional HPC guys optimise to squeeze the last bit of performance out.
The cloud side are concerned with getting things running and are less concerned with the last few percentages of performance.

Thanks for the suggestions, @ffevotte. I’ll try it out.

Thanks for the comments @johnh.

It is quite possible I’m doing it wrong :slight_smile:

Our cluster is rather heterogeneous consisting of machines added over several years. So I can not assume a single CPU type.

It is also out of convenience: my workstation has internet access, display etc, so it is a more convenient environment for building the image, than a cluster node.

See System Image Building · The Julia Language for some discussion of targets.

1 Like

@tp2750 Understood!