JuliaDiff / JuliaDiff/ForwardDiff.jl

Parallel gradient, Cannot determine ordering of Dual tags

Open
#320 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
1k
Forks
160
PR merge metrics
No merged PRs in 30d

Description

I don't have a MWE, but I hit this error on 0.6.2, not master.

ERROR: Cannot determine ordering of Dual tags ForwardDiff.Tag{#nLLp#38,Float64} and ForwardDiff.Tag{Base.Serializer.__deserialized_types__.#nLLp#38,Float64}
Stacktrace:
 [1] extract_gradient_chunk!(::Type{ForwardDiff.Tag{#nLLp#38,Float64}}, ::Array{Float64,1}, ::ForwardDiff.Dual{ForwardDiff.Tag{Base.Serializer.__deserialized_types__.#nLLp#38,Float64},Float64,8}, ::Int64, ::Int64) at /home/andrew/.julia/v0.6/ForwardDiff/src/gradient.jl:81

This happened after I tried to use pmap in an optimization routine.

I know it's possible to opt out of the tag system, but I don't believe NLSolversBase exposes that option when constructing a OnceDifferentiable type.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failure at ForwardDiff/src/gradient.jl:81 and the tag-handling path used by pmap; compare behavior in 0.6.2 and master. Then inspect how NLSolversBase constructs OnceDifferentiable and its tag-system opt-out, and establish a minimal reproduction. Done means the parallel optimization case no longer raises the ordering error, with coverage for the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.