Strange test failures on Julia 1.4, possibly related to ForwardDiff.jl

Hi all

ARCHModels.jl (registered package) has test failures on Julia 1.4, see here. Tests pass on 1.3 and on nightly.

The really strange thing is that I can reproduce this locally, but only within Pkg.test; when I run the offending test in the REPL, it works fine (fresh Julia installation with no other packages installed).

The error is a singular Hessian computed with ForwardDiff.jl, but it doesn’t seem to be merely a numerical problem: When I add @show statements and run from the REPL, I get H[1:r, 1:r] = [-1.2294260247147748 -2.1964515660007304; -2.1964515660007313 -5.541465030396839], which isn’t even close to singular (H is the Hessian). During testing, I get H[1:r, 1:r] = [0.0 0.0; 0.0 1.0739314068747037e-16].

I have no idea how to debug this further, because it happens only when testing. Any help would be greatly appreciated.

Cheers,
Simon

Pkg.test runs with checkbounds=yes so that can sometimes explain things like this. Does it error in the REPL if you start julia with that flag?

1 Like

Thank you Frederik! That does trigger the error from the REPL.

I still have no idea why it’s failing on 1.4 but not on 1.3 or nightly, but at least that gives me chance to debug it :slight_smile:

Thanks again!