sebapersson / PEtab.jl

Create parameter estimation problems for ODE models
https://sebapersson.github.io/PEtab.jl/stable/
MIT License
35 stars 5 forks source link

Issue with installing PEtab on WIndows 10 #202

Open NikosMemmos opened 2 hours ago

NikosMemmos commented 2 hours ago

Hi,

I have an issue with installing PEtab in Julia v1.10.4. on Windows 10. I get the following error:

223 dependencies successfully precompiled in 829 seconds. 368 already precompiled.
  104 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
  2 dependencies had output during precompilation:
┌ BlackBoxOptim
│  [pid 4384] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   fs_event           0000018fbf51aa50->0000018fc304c490
│   timer              0000018fc3ddc0c0->0000018fc304c4c0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
└
┌ LinearSolve
│   Downloading artifact: IntelOpenMP
│
│  [pid 27832] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0000024dd59368d0->0000024dd1e8d900
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│
│  [pid 27832] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0000024dd59368d0->0000024dd1e8d900
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
└
  4 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

Thank you very much!

sebapersson commented 1 hour ago

Thanks for reporting!

The good news is that you probably only have a problem with the pre-compilation, so you can still likely use the package without any performance loss.

From your output it is hard to see if PEtab.jl is the package failing, could you provide the output from julia> err.

There is also a known issue with the pre-compilation #201 due to the SBMLImporter. As a workaround (until PEtab is updated to the latest Catalyst version) can you try to add the following in your Project.toml file:

[deps]
PEtab = "48d54b35-e43e-4a66-a5a1-dde6b987cf69"
SBMLImporter = "210efffb-c3c8-456d-a807-6f55560b12fe"

[compat]
SBMLImporter = "=1.1.2"
NikosMemmos commented 1 hour ago

Here is the output:

ERROR: LoadError: UndefVarError: `build_SBML_model` not defined
Stacktrace:
  [1] getproperty
    @ .\Base.jl:31 [inlined]
  [2] PEtab.PEtabModel(path_yaml::String; build_julia_files::Bool, verbose::Bool, ifelse_to_event::Bool, custom_parameter_values::Nothing, write_to_file::Bool)
    @ PEtab C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtabModel\Table_input.jl:10
  [3] macro expansion
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:83 [inlined]
  [4] macro expansion
    @ C:\Users\memmo\.julia\packages\PrecompileTools\L8A3n\src\workloads.jl:78 [inlined]
  [5] macro expansion
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:82 [inlined]
  [6] macro expansion
    @ C:\Users\memmo\.julia\packages\PrecompileTools\L8A3n\src\workloads.jl:140 [inlined]
  [7] top-level scope
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:80
  [8] include
    @ .\Base.jl:495 [inlined]
  [9] 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:2222
 [10] top-level scope
    @ stdin:3
in expression starting at C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:1
in expression starting at stdin:3
  ✗ PEtab
  0 dependencies successfully precompiled in 36 seconds. 344 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

PEtab [48d54b35-e43e-4a66-a5a1-dde6b987cf69]

Failed to precompile PEtab [48d54b35-e43e-4a66-a5a1-dde6b987cf69] to "C:\\Users\\memmo\\.julia\\compiled\\v1.10\\PEtab\\jl_C241.tmp".
ERROR: LoadError: UndefVarError: `build_SBML_model` not defined
Stacktrace:
  [1] getproperty
    @ .\Base.jl:31 [inlined]
  [2] PEtab.PEtabModel(path_yaml::String; build_julia_files::Bool, verbose::Bool, ifelse_to_event::Bool, custom_parameter_values::Nothing, write_to_file::Bool)
    @ PEtab C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtabModel\Table_input.jl:10
  [3] macro expansion
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:83 [inlined]
  [4] macro expansion
    @ C:\Users\memmo\.julia\packages\PrecompileTools\L8A3n\src\workloads.jl:78 [inlined]
  [5] macro expansion
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:82 [inlined]
  [6] macro expansion
    @ C:\Users\memmo\.julia\packages\PrecompileTools\L8A3n\src\workloads.jl:140 [inlined]
  [7] top-level scope
    @ C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:80
  [8] include
    @ .\Base.jl:495 [inlined]
  [9] 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:2222
 [10] top-level scope
    @ stdin:3
in expression starting at C:\Users\memmo\.julia\packages\PEtab\sQu6O\src\PEtab.jl:1
in expression starting at stdin:
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\Users\memmo\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Types.jl:70
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
    @ Pkg.API C:\Users\memmo\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:1659
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API C:\Users\memmo\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [4] precompile
    @ C:\Users\memmo\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:147 [inlined]
  [5] #precompile#114
    @ C:\Users\memmo\.julia\juliaup\julia-1.10.4+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:146 [inlined]
  [6] #invokelatest#2
    @ .\essentials.jl:894 [inlined]
  [7] invokelatest
    @ .\essentials.jl:889 [inlined]
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1963
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1812
 [10] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
 [11] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1803
 [13] macro expansion
    @ .\loading.jl:1790 [inlined]
 [14] macro expansion
    @ .\lock.jl:267 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1753
 [16] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
 [17] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1746
Some type information was truncated. Use `show(err)` to see complete types.

It looks like the reason is the SBMLImporter based on the error.

ERROR: LoadError: UndefVarError: build_SBML_model not defined

MarcusGalea commented 1 hour ago

I'm also having issues on windows 10. I've noticed that Project.toml from main requires

[compat]
SBMLImporter = "1.0.3"

perhaps try with this. It seems like later versions of SBMLImporter doesn't have build_SBML_model

sebapersson commented 1 hour ago

Thanks for the additional output, and well spotted!

Seems like things moved a bit to fast when I updated SBMLImporter. Thus, I think I know how to fix this pre-compilation issue, so hopefully tomorrow latest I can release a new version of PEtab.jl without pre-compilation errors.

Also as a heads-up, PEtab.jl is soon (hopefully next week need to update the docs first :) also getting a major update, where this issue should not exist.