@@ -4,6 +4,7 @@ using SparseArrays, Test
4
4
using LinearAlgebra
5
5
using BlockBandedMatrices
6
6
using StaticArrays
7
+ using InteractiveUtils: @which
7
8
8
9
fcalls = 0
9
10
function f (dx,x)
@@ -84,6 +85,8 @@ function second_derivative_stencil(N)
84
85
A
85
86
end
86
87
88
+ @info " ended definitions"
89
+
87
90
x = rand (30 )
88
91
dx = rand (30 )
89
92
@@ -98,21 +101,30 @@ forwarddiff_color_jacobian!(_J1, f, x, colorvec = repeat(1:3,10))
98
101
@test _J1 ≈ J
99
102
@test fcalls == 1
100
103
104
+ @info " second passed"
105
+
101
106
fcalls = 0
102
107
_J1 = forwarddiff_color_jacobian (oopf, x, colorvec = repeat (1 : 3 ,10 ), sparsity = _J, jac_prototype = _J)
103
108
@test _J1 ≈ J
104
109
@test fcalls == 1
105
110
111
+ @info " third passed"
112
+
106
113
fcalls = 0
107
114
_J1 = forwarddiff_color_jacobian (oopf, x, colorvec = repeat (1 : 3 ,10 ), sparsity = _J)
108
115
@test _J1 ≈ J
109
116
@test fcalls == 1
110
117
118
+ @info " 4th passed"
119
+
111
120
fcalls = 0
121
+ @info " which $(@which forwarddiff_color_jacobian (staticf, SVector {30} (x), colorvec = repeat (1 : 3 ,10 ), sparsity = _J, jac_prototype = SMatrix {30,30} (_J))) "
112
122
_J1 = forwarddiff_color_jacobian (staticf, SVector {30} (x), colorvec = repeat (1 : 3 ,10 ), sparsity = _J, jac_prototype = SMatrix {30,30} (_J))
113
123
@test _J1 ≈ J
114
124
@test fcalls == 1
115
125
126
+ @info " 5"
127
+
116
128
_J1 = forwarddiff_color_jacobian (staticf, SVector {30} (x), jac_prototype = SMatrix {30,30} (_J))
117
129
@test _J1 ≈ J
118
130
_J1 = forwarddiff_color_jacobian (oopf, x, jac_prototype = similar (_J))
0 commit comments