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

Error when loading LoopVectorization after ForwardDiff with --compiled-modules=no #268

Closed
mfsch opened this issue May 22, 2021 · 3 comments

Comments

@mfsch
Copy link

mfsch commented May 22, 2021

I ran into this error when using OrdinaryDiffEq.jl with julia --compiled-modules=no:

┌ Warning: Error requiring `ForwardDiff` from `LoopVectorization`
│   exception =
│    LoadError: UndefVarError: Dual not defined
│    in expression starting at ~/.julia/packages/LoopVectorization/09Hhf/src/simdfunctionals/vmap_grad.jl:6
└ @ Requires ~/.julia/packages/Requires/7Ncym/src/require.jl:49

The most minimal case I managed to narrow it down to is having a new project with only ForwardDiff and LoopVectorization as dependencies, then starting Julia with --compiled-modules=no and first importing LoopVectorization, then ForwardDiff. When compiled modules are activated or when ForwardDiff is imported first, the error does not appear.

@chriselrod
Copy link
Member

chriselrod commented May 23, 2021

Requires bug?

What is your use case for --compiled-modules=no?

@mfsch
Copy link
Author

mfsch commented May 24, 2021

I’ve reported it as JuliaPackaging/Requires.jl#105 – let’s see if the Requires people know why this is happening.

My use case for --compiled-modules=no is that the Julia precompilation mechanism doesn’t interact well with MPI, so if you’re running an MPI program you can get errors if multiple instances of Julia are trying to precompile a package simultaneously. Running without compiled modules avoids this issue and is recommended in the MPI.jl documentation.

@chriselrod
Copy link
Member

On master:

# julia -q --startup=no --compiled-modules=no
julia> using LoopVectorization

julia> using ForwardDiff

julia>

Still a Requires bug, but we can work around it here, so it works on master.

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

2 participants