Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to precompile FEMBase #257

Closed
jinkel7 opened this issue Sep 21, 2020 · 7 comments · Fixed by JuliaFEM/FEMBasis.jl#39
Closed

Failed to precompile FEMBase #257

jinkel7 opened this issue Sep 21, 2020 · 7 comments · Fixed by JuliaFEM/FEMBasis.jl#39

Comments

@jinkel7
Copy link

jinkel7 commented Sep 21, 2020

Hi, I'm new to Julia and I want to apply JuliaFEM module.
(Julia 1.5.1 with Windows 10 Pro)
During testing JuliaFEM, error messages are written as below.
Plus, resolve() does not make any change.

Beside the problem of Calculus breaks, the messages said failed to precompile FEMBase.
May I have a solution for this issue?

Testing JuliaFEM
Status C:\Users\JIN\AppData\Local\Temp\jl_cHqPmI\Project.toml
[bc6b9049] AbaqusReader v0.2.5
[7d9fca2a] Arpack v0.4.0
[cb1a753d] AsterReader v0.2.3
[fbcbbc08] FEMBase v0.3.1
[353fb843] FEMBasis v0.2.0
[962f5c4a] FEMBeam v0.3.1
[be8e8821] FEMQuad v0.3.2
[f6369f11] ForwardDiff v0.10.12
[f67ccb44] HDF5 v0.13.6
[4030f512] HeatTransfer v0.3.1
[f80590ac] JuliaFEM v0.5.1
[9c8b4983] LightXML v0.9.0
[048d6160] MortarContact2D v0.3.1
[c1673bdb] MortarContact2DAD v0.2.0
[189a3867] Reexport v0.2.0
[a759f4b9] TimerOutputs v0.5.6
[37e2e46d] LinearAlgebra
[3fa0cd96] REPL
[2f01184e] SparseArrays
[10745b16] Statistics
[8dfed614] Test
Status C:\Users\JIN\AppData\Local\Temp\jl_cHqPmI\Manifest.toml
[bc6b9049] AbaqusReader v0.2.5
[7d9fca2a] Arpack v0.4.0
[68821587] Arpack_jll v3.5.0+3
[cb1a753d] AsterReader v0.2.3
[a74b3585] Blosc v0.7.0
[0b7ba130] Blosc_jll v1.14.3+1
[49dc2e85] Calculus v0.5.1
[bbf7d656] CommonSubexpressions v0.3.0
[e66e0078] CompilerSupportLibraries_jll v0.3.3+0
[163ba53b] DiffResults v1.0.2
[b552c78f] DiffRules v1.0.1
[fbcbbc08] FEMBase v0.3.1
[353fb843] FEMBasis v0.2.0
[962f5c4a] FEMBeam v0.3.1
[be8e8821] FEMQuad v0.3.2
[f6369f11] ForwardDiff v0.10.12
[f67ccb44] HDF5 v0.13.6
[0234f1f7] HDF5_jll v1.10.5+6
[4030f512] HeatTransfer v0.3.1
[f80590ac] JuliaFEM v0.5.1
[94ce4f54] Libiconv_jll v1.16.0+6
[9c8b4983] LightXML v0.9.0
[5ced341a] Lz4_jll v1.9.2+2
[1914dd2f] MacroTools v0.5.5
[048d6160] MortarContact2D v0.3.1
[c1673bdb] MortarContact2DAD v0.2.0
[77ba4419] NaNMath v0.3.4
[4d1e1d77] Nullables v1.0.0
[4536629a] OpenBLAS_jll v0.3.10+0
[efe28fd5] OpenSpecFun_jll v0.5.3+3
[189a3867] Reexport v0.2.0
[276daf66] SpecialFunctions v0.10.3
[90137ffa] StaticArrays v0.12.4
[a759f4b9] TimerOutputs v0.5.6
[02c8fc9c] XML2_jll v2.9.10+2
[83775a58] Zlib_jll v1.2.11+16
[3161d3a3] Zstd_jll v1.4.5+1
[2a0f44e3] Base64
[ade2ca70] Dates
[8ba89e20] Distributed
[b77e0a4c] InteractiveUtils
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[44cfe95a] Pkg
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA
[9e88b42a] Serialization
[6462fe0b] Sockets
[2f01184e] SparseArrays
[10745b16] Statistics
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
ERROR: LoadError: LoadError: Evaluation into the closed module Calculus breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating Calculus with eval during precompilation - don't do this.
Stacktrace:
[1] eval at .\boot.jl:331 [inlined]
[2] simplify(::Expr) at C:\Users\JIN.julia\packages\Calculus\mbqhh\src\symbolic.jl:96
[3] calculate_interpolation_polynomials(::Expr, ::Array{Float64,2}) at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\create_basis.jl:25
[4] create_basis(::Symbol, ::String, ::Tuple{Tuple{Float64},Tuple{Float64}}, ::Expr) at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\create_basis.jl:48
[5] top-level scope at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\lagrange_segments.jl:4
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include at .\Base.jl:368 [inlined]
[8] include(::String) at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\FEMBasis.jl:4
[9] top-level scope at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\FEMBasis.jl:16
[10] include(::Function, ::Module, ::String) at .\Base.jl:380
[11] include(::Module, ::String) at .\Base.jl:368
[12] top-level scope at none:2
[13] eval at .\boot.jl:331 [inlined]
[14] eval(::Expr) at .\client.jl:467
[15] top-level scope at .\none:3
in expression starting at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\lagrange_segments.jl:4
in expression starting at C:\Users\JIN.julia\packages\FEMBasis\hrK6J\src\FEMBasis.jl:16
ERROR: LoadError: Failed to precompile FEMBasis [353fb843-c566-51e6-ba49-78b3e3d5ebb5] to C:\Users\JIN.julia\compiled\v1.5\FEMBasis\x3cNT_GdBYD.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 C:\Users\JIN.julia\packages\FEMBase\qGDOl\src\FEMBase.jl:19
ERROR: LoadError: Failed to precompile FEMBase [fbcbbc08-f1bf-5204-9233-b69f5d396135] to C:\Users\JIN.julia\compiled\v1.5\FEMBase\6HUoq_GdBYD.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 C:\Users\JIN.julia\packages\JuliaFEM\DbhTT\src\JuliaFEM.jl:111
ERROR: LoadError: Failed to precompile JuliaFEM [f80590ac-b429-510a-8a99-e7c46989f22d] to C:\Users\JIN.julia\compiled\v1.5\JuliaFEM\JKouA_GdBYD.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(::String) at .\client.jl:457
[7] top-level scope at none:6
in expression starting at C:\Users\JIN.julia\packages\JuliaFEM\DbhTT\test\runtests.jl:4
Package JuliaFEM errored during testing

Stacktrace:
[1] pkgerror(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Types.jl:52
[2] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1578
[3] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:328
[4] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:315
[5] #test#61 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[6] test at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[7] #test#60 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[8] test at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[9] test(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[10] test(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[11] top-level scope at In[10]:1
[12] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091

@465b
Copy link

465b commented Sep 21, 2020

I think I have the same issue on an ArchLinux installation

Version

Julia Version 1.5.1
Commit 697e782ab8* (2020-08-25 20:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-10.0.1 (ORCJIT, skylake)

Error

julia> using JuliaFEM
[ Info: Precompiling JuliaFEM [f80590ac-b429-510a-8a99-e7c46989f22d]
ERROR: LoadError: LoadError: Evaluation into the closed module `Calculus` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `Calculus` with `eval` during precompilation - don't do this.

Stacktrace

Stacktrace:
 [1] eval at ./boot.jl:331 [inlined]
 [2] simplify(::Expr) at /home/ls/.julia/packages/Calculus/mbqhh/src/symbolic.jl:96
 [3] calculate_interpolation_polynomials(::Expr, ::Array{Float64,2}) at /home/ls/.julia/packages/FEMBasis/hrK6J/src/create_basis.jl:25
 [4] create_basis(::Symbol, ::String, ::Tuple{Tuple{Float64},Tuple{Float64}}, ::Expr) at /home/ls/.julia/packages/FEMBasis/hrK6J/src/create_basis.jl:48
 [5] top-level scope at /home/ls/.julia/packages/FEMBasis/hrK6J/src/lagrange_segments.jl:4
 [6] include at ./Base.jl:368 [inlined]
 [7] include(::String) at /home/ls/.julia/packages/FEMBasis/hrK6J/src/FEMBasis.jl:4
 [8] top-level scope at /home/ls/.julia/packages/FEMBasis/hrK6J/src/FEMBasis.jl:16
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:331 [inlined]
in expression starting at /home/ls/.julia/packages/FEMBasis/hrK6J/src/lagrange_segments.jl:4
in expression starting at /home/ls/.julia/packages/FEMBasis/hrK6J/src/FEMBasis.jl:16
ERROR: LoadError: Failed to precompile FEMBasis [353fb843-c566-51e6-ba49-78b3e3d5ebb5] to /home/ls/.julia/compiled/v1.5/FEMBasis/x3cNT_CC4tW.ji.
Stacktrace:
 [1] top-level scope at none:2
 [2] eval at ./boot.jl:331 [inlined]
in expression starting at /home/ls/.julia/packages/FEMBase/qGDOl/src/FEMBase.jl:19
ERROR: LoadError: Failed to precompile FEMBase [fbcbbc08-f1bf-5204-9233-b69f5d396135] to /home/ls/.julia/compiled/v1.5/FEMBase/6HUoq_CC4tW.ji.
Stacktrace:
 [1] top-level scope at none:2
 [2] eval at ./boot.jl:331 [inlined]
in expression starting at /home/ls/.julia/packages/JuliaFEM/DbhTT/src/JuliaFEM.jl:111
ERROR: Failed to precompile JuliaFEM [f80590ac-b429-510a-8a99-e7c46989f22d] to /home/ls/.julia/compiled/v1.5/JuliaFEM/JKouA_CC4tW.ji.
Stacktrace:
 [1] run_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.1/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288

@ahojukka5
Copy link
Member

This is coming from FEMBasis, which uses Calculus.jl to calculate the partial derivatives of shape functions. It's been a bit hackish, and look that it came to the end in Julia 1.5.1?

JuliaFEM/FEMBasis.jl#9

@465b
Copy link

465b commented Sep 21, 2020

Thanks for the reply first of all.
I am not sure what you mean by: "It's been a bit hackish, and look that it came to the end in Julia 1.5.1?"
Is there a workaround or is this planed to be fixed soon? It sadly makes the whole package unusable for me

@ahojukka5
Copy link
Member

Well, I made my own symbolic differentiation package (https://github.com/ahojukka5/SymDiff.jl) to figure out better what is the problem, and planning to use it in FEMBasis.jl. It's not been on high priority because with the earlier Julia versions everything has been working despite a lot of warning messages, but clearly now this needs higher priority if the compilation of the package is not working at all. I try to fix this when I have some spare time. Meanwhile, maybe downgrading Julia to 1.5.0 might help to get over of this compilation error.

@ahojukka5
Copy link
Member

Actually, the problem is "failed to precompile FEMBasis", FEMBase is just using the package.

@jinkel7
Copy link
Author

jinkel7 commented Sep 21, 2020

Thanks for the rapid answer!
The downgrade of Julia may solve this issue.

@alscunha
Copy link

I am new to Julia. I have 1.5.2 installed in Ubuntu 18.04. Upon testing JuliaFEM the first error I got was similar as reported by others,

ERROR: LoadError: LoadError: Evaluation into the closed module Calculus breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating Calculus with eval during precompilation - don't do this.

This was resolved using the suggestion in JuliaMath/Calculus.jl#151, i.e. I edited line 96 of packages/Calculus/mbqhh/src/symbolic.jl to have now

return (@static (VERSION < v"0.7.0-DEV.5149") ? eval : Core.eval)(Main, ex)

But the following errors persist. Any suggestions to pass the JuliaFEM test? I upgraded to 1.5.2 after getting the error above in 1.5.0.

Warning: Package FEMBase does not have Test in its dependencies:
│ - If you have FEMBase checked out for development and have
│ added Test as a dependency but haven't updated your primary
│ environment's manifest file, try Pkg.resolve().
│ - Otherwise you may need to report an issue with FEMBase
└ Loading Test into FEMBase from project dependency, future warnings for FEMBase are suppressed.
WARNING: using FEMBasis.interpolate in module FEMBase conflicts with an existing identifier.
WARNING: could not import Base.start into JuliaFEM
WARNING: could not import Base.next into JuliaFEM
WARNING: could not import Base.done into JuliaFEM
WARNING: could not import Base.endof into JuliaFEM
ERROR: LoadError: LoadError: TypeError: in AbstractElement, in M, expected M<:FEMBase.AbstractFieldSet, got Type{FEMBasis.Seg2}
Stacktrace:
[1] top-level scope at /home/cunha/.julia/packages/FEMBeam/oEQQ6/src/beam3d.jl:15
[2] include(::Function, ::Module, ::String) at ./Base.jl:380
[3] include at ./Base.jl:368 [inlined]
[4] include(::String) at /home/cunha/.julia/packages/FEMBeam/oEQQ6/src/FEMBeam.jl:17
[5] top-level scope at /home/cunha/.julia/packages/FEMBeam/oEQQ6/src/FEMBeam.jl:27
[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/cunha/.julia/packages/FEMBeam/oEQQ6/src/beam3d.jl:15
in expression starting at /home/cunha/.julia/packages/FEMBeam/oEQQ6/src/FEMBeam.jl:27
ERROR: LoadError: Failed to precompile FEMBeam [962f5c4a-ca9e-56d3-a659-14f0d9baaf78] to /home/cunha/.julia/compiled/v1.5/FEMBeam/uHLOY_ghA43.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/cunha/.julia/packages/JuliaFEM/DbhTT/src/JuliaFEM.jl:138
ERROR: LoadError: Failed to precompile JuliaFEM [f80590ac-b429-510a-8a99-e7c46989f22d] to /home/cunha/.julia/compiled/v1.5/JuliaFEM/JKouA_ghA43.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(::String) at ./client.jl:457
[7] top-level scope at none:6
in expression starting at /home/cunha/.julia/packages/JuliaFEM/DbhTT/test/runtests.jl:4
ERROR: Package JuliaFEM errored during testing
Stacktrace:
[1] pkgerror(::String) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/Types.jl:52
[2] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1578
[3] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:327
[4] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:314
[5] #test#61 at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[6] test at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[7] #test#60 at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[8] test at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[9] test(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[10] test(::String) at /home/cunha/software/julia/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[11] top-level scope at REPL[12]:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants