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

I have the IntelOpenMP_jll error. #743

Open
liaoweiyang2017 opened this issue Nov 23, 2022 · 8 comments
Open

I have the IntelOpenMP_jll error. #743

liaoweiyang2017 opened this issue Nov 23, 2022 · 8 comments

Comments

@liaoweiyang2017
Copy link

  • When I run the example case I have compiled according to the document, my device displays the following message:
./MyApp foo bar --julia-args -t4
fatal: error thrown and no exception handler available.
InitError(mod=:IntelOpenMP_jll, error=ErrorException("Artifact "IntelOpenMP" was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources."))

My julia version is:

julia> versioninfo()
Julia Version 1.6.6
Commit b8708f954a (2022-03-28 07:17 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Gold 6238R CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, cascadelake)
Environment:
  JULIA_PKG_SERVER = https://mirrors.tuna.tsinghua.edu.cn/julia

Could you halp me to solve it?

@KristofferC
Copy link
Sponsor Member

Can you try with Julia 1.8?

@liaoweiyang2017
Copy link
Author

Thank you! It works well with the Julia 1.8.3 environment.

@okartal
Copy link

okartal commented Dec 13, 2023

@KristofferC I have a similar issue with a sysimage that depends on Rmath. I am on Julia 1.9.4 and try to run the sysimage in a Docker container and apparently the sysimage does not work in the container because Rmath is missing.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Dec 13, 2023

Only creating a sysimage does not bundle any artifacts. You can do a Pkg.instantiate() to install those in the container (with the same environment active as the sysimage was built with).

@okartal
Copy link

okartal commented Dec 13, 2023

Does that mean, I always need the context in which the sysimage was built to relocate and use the sysimage? There is also #639 from which I understood that artifacts can be bundled but maybe I misunderstood this.

@KristofferC
Copy link
Sponsor Member

As of right now yes. There is nothing in the sysimage that contains the information needed to download the artifacts. As you mentioned, it should be possible to create a mega Artifacts.toml file that includes all artifacts needed for a sysimage.

@okartal
Copy link

okartal commented Dec 13, 2023

Thanks for the insight.

So essentially, in order to run project A with sysimage of project B, I have to either move the artifacts manually to the target container or copy project B into the target container and do Pkg.instantiate() (and take care that Docker caches the artifacts).

@JackDunnNZ
Copy link
Contributor

As of right now yes. There is nothing in the sysimage that contains the information needed to download the artifacts. As you mentioned, it should be possible to create a mega Artifacts.toml file that includes all artifacts needed for a sysimage.

@KristofferC Is there any way to achieve this automatically within the sysimage? The issue I am seeing is that the artifact loading (and resulting error) seems to occur during julia_init, and I am not sure if there is a way to insert a hook to take care of installing the artifacts before this code runs.

For a concrete example, I compile a sysimage with just Rmath:

using PackageCompiler
PackageCompiler.create_sysimage([:Rmath], sysimage_path="sys.dylib")

then when I try to start the resulting image in a clean depot:

$ JULIA_DEPOT_PATH=/tmp/cleandepot julia --sysimage sys.dylib
fatal: error thrown and no exception handler available.
InitError(mod=:Rmath_jll, error=ErrorException("Artifact "Rmath" was not found by looking in the path "/tmp/cleandepot/artifacts/9063ad4b04b0cf838498721d00ccaafa891a5372". Try `using Pkg; Pkg.instantiate()` to re-install all missing resources if the artifact is part of a package or call `Pkg.ensure_artifact_installed` (https://pkgdocs.julialang.org/v1/api/#Pkg.Artifacts.ensure_artifact_installed) if not."))
error at /Users/jack/sys.dylib (unknown line)
_artifact_str at /Users/jack/sys.dylib (unknown line)
jfptr__artifact_str_78010 at /Users/jack/sys.dylib (unknown line)
_jl_invoke at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/gf.c:3076
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/./julia.h:1982 [inlined]
jl_f__call_latest at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/builtins.c:812
__init__ at /Users/jack/sys.dylib (unknown line)
jfptr___init___93661 at /Users/jack/sys.dylib (unknown line)
_jl_invoke at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/gf.c:3076
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/./julia.h:1982 [inlined]
jl_module_run_initializer at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/toplevel.c:76
_finish_julia_init at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/init.c:901
julia_init at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/init.c:844
jl_repl_entrypoint at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-10/src/jlapi.c:725

If you have any suggestions I would greatly appreciate it

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

No branches or pull requests

4 participants