Skip to content

Creating a system image fails in Julia 1.10.0-beta2 while it works with 1.9 #50729

Closed as not planned
@ufechner7

Description

@ufechner7

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")
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions