DifferentialEquations.jl precompilation error

I’m getting this strange error when I try to compile DifferentialEquations.jl in VSCode. I’ve used this package before in VSCode without any issues; I’m not sure exactly what I did differently this time.

The full stacktrace is quite lengthy…

using DifferentialEquations

[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x2143b80 -- _jl_restore_incremental at /cygdrive/c/buildbot/worker/package_win64/build/src\dump.c:2552
in expression starting at C:\Users\Michael\.julia\packages\ArrayInterface\Kfse8\src\ArrayInterface.jl:7
_jl_restore_incremental at /cygdrive/c/buildbot/worker/package_win64/build/src\dump.c:2552
jl_restore_incremental at /cygdrive/c/buildbot/worker/package_win64/build/src\dump.c:2605 
_include_from_serialized at .\loading.jl:658
_require_search_from_serialized at .\loading.jl:760
_require at .\loading.jl:998
require at .\loading.jl:914
require at .\loading.jl:901
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
call_require at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:421 [inlined]       
eval_import_path at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:458
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:684        
jl_eval_module_expr at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:195 [inlined]
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:668
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:825
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined]
include_string at .\loading.jl:1094
_include at .\loading.jl:1148
include at .\Base.jl:386 [inlined]
include_package_for_output at .\loading.jl:1213
jfptr_include_package_for_output_36838.clone_1 at C:\Users\Michael\AppData\Local\Programs\Julia-1.6.0\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155 [inlined]
eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:575
jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:669
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:877
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined]
eval at .\client.jl:446
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155 [inlined]
eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:575
jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:669
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:877
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:825
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined]
exec_options at .\client.jl:261
_start at .\client.jl:485
jfptr__start_43335.clone_1 at C:\Users\Michael\AppData\Local\Programs\Julia-1.6.0\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
true_main at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:560
repl_entrypoint at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:702
mainCRTStartup at /cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:51
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 2648 (Pool: 2639; Big: 9); GC: 0
ERROR: LoadError: Failed to precompile ArrayInterface [4fba245c-0d91-5ea0-9b3e-6abc04ee57a9] to C:\Users\Michael\.julia\compiled\v1.6\ArrayInterface\jl_8F32.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [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:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\VectorizationBase\343do\src\VectorizationBase.jl:1
ERROR: LoadError: Failed to precompile VectorizationBase [3d5dd08c-fd9d-11e8-17fa-ed2836048c2f] to C:\Users\Michael\.julia\compiled\v1.6\VectorizationBase\jl_8CD0.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [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:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\LoopVectorization\8MeJu\src\LoopVectorization.jl:1
ERROR: LoadError: LoadError: Failed to precompile LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890] to C:\Users\Michael\.julia\compiled\v1.6\LoopVectorization\jl_8946.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include(mod::Module, _path::String)
    @ Base .\Base.jl:386
  [8] include(x::String)
    @ RecursiveFactorization ~\.julia\packages\RecursiveFactorization\mi9Zz\src\RecursiveFactorization.jl:1
  [9] top-level scope
    @ ~\.julia\packages\RecursiveFactorization\mi9Zz\src\RecursiveFactorization.jl:3
 [10] include
    @ .\Base.jl:386 [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:1213
 [12] top-level scope
    @ none:1
 [13] eval
    @ .\boot.jl:360 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [15] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\RecursiveFactorization\mi9Zz\src\lu.jl:1
in expression starting at C:\Users\Michael\.julia\packages\RecursiveFactorization\mi9Zz\src\RecursiveFactorization.jl:1
ERROR: LoadError: Failed to precompile RecursiveFactorization [f2c3362d-daeb-58d1-803e-2bc74f2840b4] to C:\Users\Michael\.julia\compiled\v1.6\RecursiveFactorization\jl_85AC.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [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:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\DiffEqBase\krS36\src\DiffEqBase.jl:1
ERROR: LoadError: Failed to precompile DiffEqBase [2b5f629d-d688-5b77-993f-72d75c75574e] to C:\Users\Michael\.julia\compiled\v1.6\DiffEqBase\jl_8241.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [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:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\DifferentialEquations\HSWeG\src\DifferentialEquations.jl:1
ERROR: LoadError: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to C:\Users\Michael\.julia\compiled\v1.6\DifferentialEquations\jl_7E98.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base .\loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1306
 [4] _require(pkg::Base.PkgId)
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Michael\.julia\packages\DifferentialEquations\HSWeG\src\DifferentialEquations.jl:1
ERROR: LoadError: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to C:\Users\Michael\.julia\compiled\v1.6\DifferentialEquations\jl_7E98.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base .\loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1306
 [4] _require(pkg::Base.PkgId)
 [5] require(uuidkey::Base.PkgId)
   @ Base .\loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:901
in expression starting at c:\Julia\test_program.jl:1

When I try Pkg.status("DifferentialEquations"), I get the following:

Pkg.status("DifferentialEquations")
     Project ODEParamEst v0.1.0
      Status `C:\Julia\ODEParamEst\Project.toml`
  [0c46a032] DifferentialEquations v6.16.0

Some other possibly relevant info:
-I’m using version 1.54.3 of VSCode, and Julia 1.6.0
-My file is in a project named “ODEParamEst”. I recently tried creating an “environment” for this project (I’m still learning the very basics of package management, so I may well have screwed something up when trying to do this…)
-Other packages such as Plots, DataFrames, XLSX, Random, Statistics, and a few others, all precompile/compile just fine.
-ForwardDiff and Optim give the same exact errors as DifferentialEquations.

If anyone has troubleshooting suggestions, it would be greatly appreciated!

@Elrod possibly some LoopVectorization related thing through ArrayInterface.jl?

Looks like it, given the RecursiveFactorization → LoopVectorization → VectorizationBase → ArrayInterface chain in the stack trace.

Probably not related, but LoopVectorization’s tests crash on Windows + Julia 1.6, but pass on Windows with both Julia 1.5 and nightly (also pass for Mac and Linux on 1.6).

@Michael_Barmann mind starting with just ArrayInterface?

Thanks for the reply. Do you mean to try compiling ArrayInterface only? ArrayInterface was not already installed apparently, so I first tried Pkg.add("ArrayInterface"), but got this error:

julia> Pkg.add("ArrayInterface")
    Updating registry at `C:\Users\Michael\.julia\registries\General`
   Resolving package versions...
ERROR: expected the file `src/ODEParamEst.jl` to exist for package `ODEParamEst` at `C:\Julia\ODEParamEst`
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
  [2] read_package(path::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:439
  [3] collect_project!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec, path::String, deps_map::Dict{Base.UUID, Vector{Pkg.Types.PackageSpec}})
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:270
  [4] collect_fixed!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, names::Dict{Base.UUID, String})
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:320
  [5] resolve_versions!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:378
  [6] targeted_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1208
  [7] tiered_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1180
  [8] _resolve
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1214 [inlined]
  [9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1229
 [10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:197
 [11] add
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:148 [inlined]
 [12] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73
 [13] add
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72 [inlined]
 [14] #add#21
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
 [15] add
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
 [16] #add#20
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69 [inlined]
 [17] add(pkg::String)
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
 [18] top-level scope
    @ REPL[9]:1
julia> using Pkg; Pkg.rm("ODEParamEst")

and then try again.

This is what I got:

julia> Pkg.rm("ODEParamEst")
ERROR: The following package names could not be resolved:
 * ODEParamEst (not found in project or manifest)

Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
  [2] ensure_resolved(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:862
  [3] ensure_resolved
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:825 [inlined]
  [4] rm(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; mode::Pkg.Types.PackageMode, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:221
  [5] rm
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:202 [inlined]
  [6] #rm#30
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73 [inlined]
  [7] rm
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72 [inlined]
  [8] #rm#29
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
  [9] rm
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
 [10] rm(pkg::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
 [11] rm(pkg::String)
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
 [12] top-level scope
    @ REPL[11]:1

(ODEParamEst is just the name of the project folder that my file is contained in.)

The error you got was about it thinking your project folder is a package, not about ArrayInterface.

Yeah that’s what I suspected…any ideas for what to try next?

Why does Julia think your project is a package?
I’ve used a lot of environments, but never had that happen.
I just create a folder for the project, and start Julia with --project=path/to/project and never ran into any issues.

As a hack, you could just create the file (src/ODEParamEst.jl) it expects to exist.

Ahh, my apologies–ODEParamEst is actually a package I created. (I was testing out how to make a package using this guide: 5. Creating Packages · Pkg.jl (julialang.org).) As you can tell, I’m a major newbie at this :upside_down_face:

No worries! We were all newbies when we started.

For creating packages, I always use PkgTemplates.jl. It’ll create the skeleton of your package for you, and lets you configure plugins.
It even has an interactive/wizard mode that can walk you through it, which would probably be a good idea the first time.

(For future times, it’s nice to not use the Wizard at least once, so that every time thereafter you can just search your history and repeat the same command you used last time.)

Thanks, this looks very helpful!

For now though, is there a way to get DifferentialEquations.jl working in the package I’ve already created?

Does using ODEParamEst work? (It should after you create src/ODEParamEst.jl)
Once you fix the problems with your package, please show me the new error (if there is one) from using ArrayInterface.

So in a moment of frustration, I deleted the package and made a new one (using PkgTemplates). DifferentialEquations.jl now works in it without any issues!

1 Like

Hi,

I have a similar issue about precompiling Differential Equations at some package that I have - called ScalarGas.

I tried to delete manifest.toml file and also delete all the ~/.julia/compiled/v1.5/ folder but nothing helped.

Here is what I get when I tried to use DifferentialEquations.jl, and if I tried that outside my package everything is just fine.

[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
ERROR: LoadError: LoadError: UndefVarError: alg_difftype not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at /home/elyco/.julia/packages/StochasticDiffEq/BKyQ3/src/alg_utils.jl:259
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include at ./Base.jl:368 [inlined]
 [5] include(::String) at /home/elyco/.julia/packages/StochasticDiffEq/BKyQ3/src/StochasticDiffEq.jl:4
 [6] top-level scope at /home/elyco/.julia/packages/StochasticDiffEq/BKyQ3/src/StochasticDiffEq.jl:100
 [7] include(::Function, ::Module, ::String) at ./Base.jl:380
 [8] include(::Module, ::String) at ./Base.jl:368
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:331 [inlined]
 [11] eval(::Expr) at ./client.jl:467
 [12] top-level scope at ./none:3
in expression starting at /home/elyco/.julia/packages/StochasticDiffEq/BKyQ3/src/alg_utils.jl:259
in expression starting at /home/elyco/.julia/packages/StochasticDiffEq/BKyQ3/src/StochasticDiffEq.jl:100
ERROR: LoadError: Failed to precompile StochasticDiffEq [789caeaf-c7a9-5a7d-9973-96adeb23e2a0] to /home/elyco/.julia/compiled/v1.5/StochasticDiffEq/36ZnY_7ruN7.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /home/elyco/.julia/packages/DifferentialEquations/el96s/src/DifferentialEquations.jl:10
ERROR: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to /home/elyco/.julia/compiled/v1.5/DifferentialEquations/UQdwS_7ruN7.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] eval at ./boot.jl:331 [inlined]
 [7] eval at ./Base.jl:39 [inlined]
 [8] repleval(::Module, ::Expr, ::String) at /home/elyco/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:157
 [9] (::VSCodeServer.var"#69#71"{Module,Expr,REPL.LineEditREPL,REPL.LineEdit.Prompt})() at /home/elyco/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:123
 [10] (::VSCodeServer.var"#68#70"{Module,Expr,REPL.LineEditREPL,REPL.LineEdit.Prompt})() at /home/elyco/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/repl.jl:124
 [11] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [12] invokelatest(::Any) at ./essentials.jl:709
 [13] macro expansion at /home/elyco/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [14] (::VSCodeServer.var"#53#54")() at ./task.jl:356

I even deleted most of the ScalarGas.jl file now it contains just the skeleton of every package I have.

module ScalarGas
greet() = println("Hi there")
end

Does anyone have some insight about what I can do for that problem?

st DifferentialEquations gives

Project ScalarGas v0.1.0
Status `~/github/scalar_gas/Project.toml`
  [0c46a032] DifferentialEquations v6.18.0

and I’m using julia 1.5.3.

Lastly I would like to mention that I used the DifferentialEquations package for months now and everything was fine, I have no idea what happened suddenly.

Ok,
I’ve managed to solve the problem, not sure what I did that makes it works but just if anyone will encounter this problem again here what I’ve done:

I’ve upgraded to julia 1.6.3, then erased the manifest.toml file again, reinstalled all the relevant packages and now it’s working.

1 Like