# OrdinaryDiffEq fails to precompile in julia 1.7.2

**URL:** https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337
**Category:** General Usage
**Tags:** question, package
**Created:** [March 3, 2022, 4:50am UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337 "2022-03-03T04:50:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![jackblyle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackblyle/32/34276_2.png) [@jackblyle](https://discourse.julialang.org/u/jackblyle)
#### Post date: [March 3, 2022, 4:50am UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/1 "2022-03-03T04:50:08Z")

</div>

I am suddenly getting an error when precompiling the OrdinaryDiffEq package. I originally ran into it in a jupyter-lab notebook (ipynb) that worked a few days ago. I then tried creating a new environment and I still get the problem.

Specific steps:

conda create -n sfsa1  
conda activate sfsa1  
conda install -c conda-forge julia  
julia  
returned Version 1.7.2 (2022-02-06)  
using Pkg  
Pkg.add(“OrdinaryDiffEq”)  
much happy green stuff, then  
✗ VectorizationBase  
✗ SLEEFPirates  
✗ SIMDDualNumbers  
✗ LoopVectorization  
✗ TriangularSolve  
✗ RecursiveFactorization  
✗ LinearSolve  
✗ NonlinearSolve  
✗ DiffEqBase  
✗ OrdinaryDiffEq  
101 dependencies successfully precompiled in 30 seconds  
10 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia\> import Pkg; Pkg.precompile()  
Precompiling project…  
✗ VectorizationBase  
✗ SLEEFPirates  
✗ SIMDDualNumbers  
✗ LoopVectorization  
✗ TriangularSolve  
✗ RecursiveFactorization  
✗ LinearSolve  
✗ NonlinearSolve  
✗ DiffEqBase  
✗ OrdinaryDiffEq  
0 dependencies successfully precompiled in 22 seconds (101 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed]

Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/OrdinaryDiffEq/jl\_9oz7hR.  
ERROR: LoadError: UndefVarError: num\_cache\_levels not defined  
Stacktrace:  
[1] include  
@ ./Base.jl:418 [inlined]  
[2] 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, UInt64}}, source::String)  
@ Base ./loading.jl:1318  
[3] top-level scope  
@ none:1  
[4] eval  
@ ./boot.jl:373 [inlined]  
[5] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[6] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/VectorizationBase/yDGcX/src/VectorizationBase.jl:1  
followed by more of the same.

Any ideas?

Ad Astra,

Jack

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [March 3, 2022, 12:28pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/2 "2022-03-03T12:28:43Z")

</div>

@Elrod do you know what this is?

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [March 3, 2022, 2:23pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/3 "2022-03-03T14:23:13Z")

</div>

That sounds like it’s using CPUSummary 0.1.10, which is broken. 0.1.9 is also broken.  
Using \<=0.1.8, or \>=0.1.11.  
I’m not sure why the resolver would prefer a broken version, given newer non-broken alternatives.

Also, these show up because Hwloc failed to load.  
This may indicate the check is bad, and returns a ton of false negatives.  
Locally, it works.

---

<div class="post-metadata">

### Author: ![jackblyle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackblyle/32/34276_2.png) [@jackblyle](https://discourse.julialang.org/u/jackblyle)
#### Post date: [March 3, 2022, 4:46pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/4 "2022-03-03T16:46:36Z")

</div>

Gentlemen,

Thank you for looking into this, but what I am immediately looking for is a work-around. Do we know that version x.x.x of OrdinaryDiffEq works with julia 1.7.x for example. Or as a teaching moment, how do I check that myself?

Ad Astra,

Jack

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [March 3, 2022, 5:30pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/5 "2022-03-03T17:30:31Z")

</div>

Anything like OrdinaryDiffEq v5 or above should be fine. That’s not your issue though. Sounds like it’s CPUSummary.jl, and figuring out why that went into a weird version is what’s essential.

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [March 3, 2022, 7:01pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/6 "2022-03-03T19:01:55Z")

</div>

`] add CPUSummary`  
That should trigger it to update and fix the problem.  
Please tell me the version.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [March 3, 2022, 8:34pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/7 "2022-03-03T20:34:06Z")

</div>

If a version is hopelessly broken it should be yanked from the registry

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [March 3, 2022, 9:01pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/8 "2022-03-03T21:01:30Z")

</div>

[https://github.com/JuliaRegistries/General/pull/55916](https://github.com/JuliaRegistries/General/pull/55916)

EDIT: Merged, bad CPUSummary versions have been yanked.

---

<div class="post-metadata">

### Author: ![jackblyle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackblyle/32/34276_2.png) [@jackblyle](https://discourse.julialang.org/u/jackblyle)
#### Post date: [March 4, 2022, 5:38am UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/9 "2022-03-04T05:38:39Z")

</div>

(@sfsa1) pkg\> add CPUSummary  
Resolving package versions…  
Updating `~/.conda/envs/sfsa1/share/julia/environments/sfsa1/Project.toml`  
[2a0fbf3d] + CPUSummary v0.1.10  
No Changes to `~/.conda/envs/sfsa1/share/julia/environments/sfsa1/Manifest.toml`

---

<div class="post-metadata">

### Author: ![jackblyle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackblyle/32/34276_2.png) [@jackblyle](https://discourse.julialang.org/u/jackblyle)
#### Post date: [March 4, 2022, 5:41am UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/10 "2022-03-04T05:41:31Z")

</div>

Here is the full error trace when trying to precompile:

julia\> using OrdinaryDiffEq  
[Info: Precompiling OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed]  
ERROR: LoadError: UndefVarError: num\_cache\_levels not defined  
Stacktrace:  
[1] include  
@ ./Base.jl:418 [inlined]  
[2] 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, UInt64}}, source::String)  
@ Base ./loading.jl:1318  
[3] top-level scope  
@ none:1  
[4] eval  
@ ./boot.jl:373 [inlined]  
[5] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[6] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/VectorizationBase/yDGcX/src/VectorizationBase.jl:1  
ERROR: LoadError: Failed to precompile VectorizationBase [3d5dd08c-fd9d-11e8-17fa-ed2836048c2f] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/VectorizationBase/jl\_LH0w2b.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, ignore\_loaded\_modules::Bool)  
@ Base ./loading.jl:1466  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base ./loading.jl:1410  
[4] \_require(pkg::Base.PkgId)  
@ Base ./loading.jl:1120  
[5] require(uuidkey::Base.PkgId)  
@ Base ./loading.jl:1013  
[6] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:997  
[7] include  
@ ./Base.jl:418 [inlined]  
[8] 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, UInt64}}, source::String)  
@ Base ./loading.jl:1318  
[9] top-level scope  
@ none:1  
[10] eval  
@ ./boot.jl:373 [inlined]  
[11] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[12] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/LoopVectorization/tSQDi/src/LoopVectorization.jl:1  
ERROR: LoadError: Failed to precompile LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/LoopVectorization/jl\_g20eGY.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, ignore\_loaded\_modules::Bool)  
@ Base ./loading.jl:1466  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base ./loading.jl:1410  
[4] \_require(pkg::Base.PkgId)  
@ Base ./loading.jl:1120  
[5] require(uuidkey::Base.PkgId)  
@ Base ./loading.jl:1013  
[6] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:997  
[7] include(mod::Module, \_path::String)  
@ Base ./Base.jl:418  
[8] include(x::String)  
@ RecursiveFactorization ~/.julia/packages/RecursiveFactorization/mIP2e/src/RecursiveFactorization.jl:1  
[9] top-level scope  
@ ~/.julia/packages/RecursiveFactorization/mIP2e/src/RecursiveFactorization.jl:3  
[10] include  
@ ./Base.jl:418 [inlined]  
[11] 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, UInt64}}, source::String)  
@ Base ./loading.jl:1318  
[12] top-level scope  
@ none:1  
[13] eval  
@ ./boot.jl:373 [inlined]  
[14] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[15] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/RecursiveFactorization/mIP2e/src/lu.jl:1  
in expression starting at /home/jlyle/.julia/packages/RecursiveFactorization/mIP2e/src/RecursiveFactorization.jl:1  
ERROR: LoadError: Failed to precompile RecursiveFactorization [f2c3362d-daeb-58d1-803e-2bc74f2840b4] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/RecursiveFactorization/jl\_V48LiI.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, ignore\_loaded\_modules::Bool)  
@ Base ./loading.jl:1466  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base ./loading.jl:1410  
[4] \_require(pkg::Base.PkgId)  
@ Base ./loading.jl:1120  
[5] require(uuidkey::Base.PkgId)  
@ Base ./loading.jl:1013  
[6] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:997  
[7] include  
@ ./Base.jl:418 [inlined]  
[8] 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, UInt64}}, source::String)  
@ Base ./loading.jl:1318  
[9] top-level scope  
@ none:1  
[10] eval  
@ ./boot.jl:373 [inlined]  
[11] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[12] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/DiffEqBase/Y5mGv/src/DiffEqBase.jl:1  
ERROR: LoadError: Failed to precompile DiffEqBase [2b5f629d-d688-5b77-993f-72d75c75574e] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/DiffEqBase/jl\_348VQR.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, ignore\_loaded\_modules::Bool)  
@ Base ./loading.jl:1466  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base ./loading.jl:1410  
[4] \_require(pkg::Base.PkgId)  
@ Base ./loading.jl:1120  
[5] require(uuidkey::Base.PkgId)  
@ Base ./loading.jl:1013  
[6] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:997  
[7] include  
@ ./Base.jl:418 [inlined]  
[8] 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, UInt64}}, source::Nothing)  
@ Base ./loading.jl:1318  
[9] top-level scope  
@ none:1  
[10] eval  
@ ./boot.jl:373 [inlined]  
[11] eval(x::Expr)  
@ Base.MainInclude ./client.jl:453  
[12] top-level scope  
@ none:1  
in expression starting at /home/jlyle/.julia/packages/OrdinaryDiffEq/Op0Oq/src/OrdinaryDiffEq.jl:1  
ERROR: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to /home/jlyle/.conda/envs/sfsa1/share/julia/compiled/v1.7/OrdinaryDiffEq/jl\_bBhx3g.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, ignore\_loaded\_modules::Bool)  
@ Base ./loading.jl:1466  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base ./loading.jl:1410  
[4] \_require(pkg::Base.PkgId)  
@ Base ./loading.jl:1120  
[5] require(uuidkey::Base.PkgId)  
@ Base ./loading.jl:1013  
[6] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:997

---

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [August 31, 2022, 12:21pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/11 "2022-08-31T12:21:01Z")

</div>

Same issue here, cannot figure out whats happening.

```julia
ERROR: LoadError: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to /home/daniel/.julia/compiled/v1.7/OrdinaryDiffEq/jl_zWlkoC.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

```

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [August 31, 2022, 1:39pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-fails-to-precompile-in-julia-1-7-2/77337/12 "2022-08-31T13:39:44Z")

</div>

That seems like a separate issue? The LoopVectorization stuff was found and handled. Can you open a separate thread and share information? You cutoff the stack trace before it gave the information 😅

Also, I would highly recommend upgrading to v1.8 and sharing `]st` which will tell us a lot more about the current packages on your system.
