Precompilation issue with DifferentialEquations.jl

I am using julia-1.10.0. I am using julia remotely on the Rocky 9 VM.

I am getting the following error in the pre-compilation of the DifferentialEquations.jl package:
PkgPrecompileError: The following 1 direct dependency failed to precompile:

BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d]

Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_naC0YO”.
[98083] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/spgaR/src/BoundaryValueDiffEq.jl:5

Full Error Message:

Precompiling DifferentialEquations
Info Given DifferentialEquations was explicitly requested, output will be shown live

[100823] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/spgaR/src/BoundaryValueDiffEq.jl:50
ERROR: LoadError: Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_MbWQTp”.ueDiffEq → BoundaryValueDiffEqOrdinaryDiffEqExt
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2462
[3] compilecache
@ Base ./loading.jl:2334 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1968
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ Base ./essentials.jl:889 [inlined]
[9] invokelatest
@ Base ./essentials.jl:884 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2977
[11] maybe_cachefile_lock
@ Base ./loading.jl:2974 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1964
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1806
[14] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[15] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1797
[17] macro expansion
@ Base ./loading.jl:1784 [inlined]
[18] macro expansion
@ Base ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1747
[20] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[21] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1740
[23] include
@ Base ./Base.jl:495 [inlined]
[24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2216
[25] top-level scope
@ stdin:3
in expression starting at /users/hails/santeg/.julia/packages/DifferentialEquations/Tu7HS/src/DifferentialEquations.jl:1
in expression starting at stdin:3
✗ BoundaryValueDiffEq
✗ BoundaryValueDiffEq → BoundaryValueDiffEqOrdinaryDiffEqExt
✗ DifferentialEquations
0 dependencies successfully precompiled in 61 seconds. 276 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d]

Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_snDuZ3”.
[100713] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/spgaR/src/BoundaryValueDiffEq.jl:50
DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to “/users/hails/santeg/.julia/compiled/v1.10/DifferentialEquations/jl_wi9Uea”.
[100823] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/spgaR/src/BoundaryValueDiffEq.jl:50
ERROR: LoadError: Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_MbWQTp”.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2462
[3] compilecache
@ Base ./loading.jl:2334 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1968
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ Base ./essentials.jl:889 [inlined]
[9] invokelatest
@ Base ./essentials.jl:884 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2977
[11] maybe_cachefile_lock
@ Base ./loading.jl:2974 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1964
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1806
[14] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[15] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1797
[17] macro expansion
@ Base ./loading.jl:1784 [inlined]
[18] macro expansion
@ Base ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1747
[20] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[21] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1740
[23] include
@ Base ./Base.jl:495 [inlined]
[24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2216
[25] top-level scope
@ stdin:3
in expression starting at /users/hails/santeg/.julia/packages/DifferentialEquations/Tu7HS/src/DifferentialEquations.jl:1
in expression starting at stdin:3

What is the output of:

using Pkg
Pkg.status()

Did you try it in a clean environment, e.g.

mkdir test
cd test
julia --project="."

and then in Julia:

using Pkg
Pkg.add("DifferentialEquations")

And what is the output of:

versioninfo()

Thanks for your reply.

Package status:

julia> Pkg.status()
Status ~/.julia/environments/v1.10/Project.toml
[4fba245c] ArrayInterface v7.7.0
[052768ef] CUDA v5.1.2
[a93c6f00] DataFrames v1.6.1
[071ae1c0] DiffEqGPU v3.4.0
⌃ [0c46a032] DifferentialEquations v7.11.0
[7ed4a6bd] LinearSolve v2.22.1
[91a5bcdd] Plots v1.39.0
[47a9eef4] SparseDiffTools v2.15.0
[0d7ed370] StaticArrayInterface v1.5.0
⌃ [0c5d862f] Symbolics v5.11.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

Version Info

Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 4 × AMD EPYC 7452 32-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
Threads: 1 on 4 virtual cores

Clean environmnet:

No I have not tried in a clean environment.

Do I need to create a new environment directory within .julia directory or I can create in a different location as well?

You can use any directory, but preferably not .julia

I mean, usually you create a per-project environment (= Project.toml + Manifest.toml) in the main folder of your project…

Thanks for the prompt reply. I will try it again after creating a new environment directory.

1 Like

I have tried the above steps. My code:

(@v1.10) pkg> st
Status ~/.julia/environments/v1.10/Project.toml
[91a5bcdd] Plots v1.39.0

shell> mkdir project_01

shell> cd project_01
/users/hails/santeg/project_01

shell> julia --project=“.”
_
_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type “?” for help, “]?” for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.10.0 (2023-12-25)
/ |_|||_’_| | Official https://julialang.org/ release
|__/ |

(project_01) pkg> status
Status ~/project_01/Project.toml (empty project)

(project_01) pkg> add DifferentialEquations

I am still facing the same problem!!!

Error:

(project_01) pkg> build DifferentialEquations

(project_01) pkg> precompile DifferentialEquations
Precompiling DifferentialEquations
Info Given DifferentialEquations was explicitly requested, output will be shown live

[131289] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/SrG4p/src/BoundaryValueDiffEq.jl:50
ERROR: LoadError: Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_t6XyFE”.aryValueDiffEq
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2462
[3] compilecache
@ Base ./loading.jl:2334 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1968
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ Base ./essentials.jl:889 [inlined]
[9] invokelatest
@ Base ./essentials.jl:884 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2977
[11] maybe_cachefile_lock
@ Base ./loading.jl:2974 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1964
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1806
[14] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[15] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1797
[17] macro expansion
@ Base ./loading.jl:1784 [inlined]
[18] macro expansion
@ Base ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1747
[20] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[21] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1740
[23] include
@ Base ./Base.jl:495 [inlined]
[24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2216
[25] top-level scope
@ stdin:3
in expression starting at /users/hails/santeg/.julia/packages/DifferentialEquations/v7yof/src/DifferentialEquations.jl:1
in expression starting at stdin:3
✗ BoundaryValueDiffEq
✗ BoundaryValueDiffEq → BoundaryValueDiffEqOrdinaryDiffEqExt
✗ DifferentialEquations
0 dependencies successfully precompiled in 59 seconds. 179 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to “/users/hails/santeg/.julia/compiled/v1.10/DifferentialEquations/jl_IWspU3”.
[131289] signal (11.1): Segmentation fault
in expression starting at /users/hails/santeg/.julia/packages/BoundaryValueDiffEq/SrG4p/src/BoundaryValueDiffEq.jl:50
ERROR: LoadError: Failed to precompile BoundaryValueDiffEq [764a87c0-6b3e-53db-9096-fe964310641d] to “/users/hails/santeg/.julia/compiled/v1.10/BoundaryValueDiffEq/jl_t6XyFE”.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2462
[3] compilecache
@ Base ./loading.jl:2334 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1968
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile /opt/julia-1.10.0/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ Base ./essentials.jl:889 [inlined]
[9] invokelatest
@ Base ./essentials.jl:884 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2977
[11] maybe_cachefile_lock
@ Base ./loading.jl:2974 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1964
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1806
[14] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[15] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1797
[17] macro expansion
@ Base ./loading.jl:1784 [inlined]
[18] macro expansion
@ Base ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1747
[20] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[21] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1740
[23] include
@ Base ./Base.jl:495 [inlined]
[24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2216
[25] top-level scope
@ stdin:3
in expression starting at /users/hails/santeg/.julia/packages/DifferentialEquations/v7yof/src/DifferentialEquations.jl:1
in expression starting at stdin:

How much memory (RAM) do you have?

free -h

I have 16 GB RAM. I am using a remote virtual machine.

shell> free -h
total used free shared buff/cache available
Mem: 15Gi 3.8Gi 6.0Gi 54Mi 6.2Gi 11Gi
Swap: 1.0Gi 0B 1.0Gi

Available memory is 11Gi

And if you try to add only BoundaryValueDiffEq?

]
rm DifferentialEquations
add BoundaryValueDiffEq

Just to narrow down the problem.

okay, I will try it.

Status after removing DifferentialEquations.jl:

(project_01) pkg> st
Status ~/project_01/Project.toml (empty project)

adding BoundaryValue…

(project_01) pkg> add BoundaryValueDiffEq

error:

Precompiling project…
✗ BoundaryValueDiffEq
4 dependencies successfully precompiled in 133 seconds. 133 already precompiled.
1 dependency errored.
For a report of the errors see julia> err. To retry use pkg> precompile

Do you actually need this package? If yes, report a bug at Issues · SciML/BoundaryValueDiffEq.jl · GitHub .

If not, just install what you need. I usually only install OrdinaryDiffEq which is much smaller and has all the functionality I need…

Sometimes there are also corrupt intermediate files in the .julia folder…

You could try to delete it if you are sure there is nothing in there what you still need…

Odd that the error message throws almost no information. Try just doing LinearSolve?

Thanks for your replay. Can I skip BoundaryValueDiffEq.jl from DifferentialEquations.jl?

Thanks for your reply. I will try LinearSolve only.