Closed as not planned
Closed as not planned
Description
On Ubuntu Linux version 20.04 with 16GB physical RAM creating a system image using package compiler fails badly when using Julia 1.10. The problem is that the system runs out of memory. With "fails badly" I mean that my laptop gets stuck, the OOM killer is not getting activated. Probably the memory usage rises too fast for the OOM killer.
This should not happen. Before starting the multi-threaded system image creation Julia should check the available free RAM (including the swap file) and if less than 6GB are free it should only start one thread. Alternatively there could be a command line option that determines the number of threads to use.
I use the following script to create a system image:
using Pkg
@info "Loading packages ..."
using ModelingToolkit, OrdinaryDiffEq, DataInterpolations, LaTeXStrings, Timers,
PackageCompiler, ControlSystemsBase, Roots, JLD2, YAML, DataFrames, MAT, EnumX,
FFTW, Revise
PackageCompiler.create_sysimage(
[:ModelingToolkit, :OrdinaryDiffEq, :DataInterpolations, :LaTeXStrings, :Timers,
:ControlSystemsBase, :Roots, :JLD2, :YAML, :DataFrames, :MAT, :EnumX, :FFTW, :Revise];
sysimage_path="kps-image_tmp.so",
precompile_execution_file=joinpath("test", "test_for_precompile.jl")
)