Hello,
I'm trying to use ReverseDiffSource to produce the exact Jacobian for a
pretty simple nonlinear function below.
Testfunction works fine, but testfunction2 produces the error reprinted.
Could someone explain what might be going wrong?
Thanks!
Eliot
using ReverseDiffSource
testfunction(x) = exp(x[1] + x[2])
testfunction_diff = rdiff(testfunction, (ones(2),), order=1)
testfunction_diff([1,2])
testfunction2(x) = exp(x[1] + x[2] + x[3])
testfunction2_diff = rdiff(testfunction2, (ones(3),), order=1)
testfunction2_diff([1,2,3])
ERROR: no derivation rule for + at arg #1 for signature
Tuple{Float64,Float64,Float64}
in error at
/Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
in rev at
/Users/eliotabrams/.julia/v0.4/ReverseDiffSource/src/reversegraph.jl:50
in reversepass! at
/Users/eliotabrams/.julia/v0.4/ReverseDiffSource/src/reversegraph.jl:246
in reversegraph at
/Users/eliotabrams/.julia/v0.4/ReverseDiffSource/src/reversegraph.jl:23
in rdiff at
/Users/eliotabrams/.julia/v0.4/ReverseDiffSource/src/rdiff.jl:70
in rdiff at
/Users/eliotabrams/.julia/v0.4/ReverseDiffSource/src/frdiff.jl:23