You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MathMixMatFun.add and MathMixMatFun.subtract tests seem to fail randomly? #1453
I'm looking into what's going on right now. Not sure if it's some weird interaction between something and MPI since the tests on the GPU node pass fine
Alright idk y but breaking them up into individual tests fixed it for one of the PRs. Gonna close this. @rok-cesnovar if you have time / think the matrix_cl<var> PR can get in tmrw we can just leave the fix in there otherwise I can slam out a quick PR that just has those fixed up
There are still a couple residual MPI-based tests that I didn't remove that do some setup. One is:
test/unit/math/rev/mat/fun/multiply_test.cpp
Do the other tests need similar config? I don't know how tests/MPI are calling everything from the outside.
On Nov 11, 2019, at 10:05 PM, Steve Bronder ***@***.***> wrote:
I'm looking into what's going on right now. Not sure if it's some weird interaction between something and MPI since the tests on the GPU node pass fine
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or unsubscribe.
[ RUN ] MathMixMatFun.add_vec_mat
./test/unit/math/expect_near_rel.hpp:39: Failure
The difference between x1 and x2 is 0.0010334642265417964, which exceeds tol, where
x1 evaluates to -0.0010334642265417964,
x2 evaluates to 0, and
tol evaluates to 0.001.
expect_near_rel_finite(-0.0010334642265417964, 0, absolute tolerance = 0.001); absolute diff = 0.0010334642265417964 in: expect_near_rel; require items x1(i) = x2(i): hessian() Hessian
...
First, the failure's within acceptable bounds. I've had to lower precision on a lot of finite diff Hessian tests to 1e-2. So if I'd gotten this locally, I'd have just lowered tolerances.
The test (see below) doesn't have any randomness. That means arithmetic is changing on different runs. The test that's failing here is this one:
The expect_ad code isn't using any kind of multi-threading or introducing any statics anywhere. I suspect it may be running with different compiler configs or different hardware config, both of which can change details of arithmetic precision.
The easiest way to fix these is to include:
stan::test::ad_tolerances tols; // sets up with defaults
tols.hessian_hessian_ = 1e-2; // increase acceptable Hessian finite diff error for rev
tols.hessian_fvar_hessian_ = 1e-2; // " for fwd
...
expect_ad(tols, ...);
I added the forward mode because this report also shows up. The key is the hessian_fvar() Hessian line. That indicates that a call to the functional hessian_fvar() failed when computing the Hessian.
The errors then follow that nomenclature in lower case to make it easy to update the tests without looking at the tolerances code (only took a few painful attempts to line up messages and constants before I did that).
Were other tests failing in different situations? It might make sense to just lower Hessian tolerance to 1e-2 globally, or even 5e-3, because we get lots of failures right around 1e-3.
There were 7 merges to develop and no tests failed here so I am closing this. Thanks to @bob-carpenter for providing the solution.
Develop did fail once with /usr/local/opt/llvm@6/bin/clang++: /usr/local/opt/llvm@6/bin/clang++: cannot execute binary file but I am assuming that is hopefully one time Jenkins issue.
It would be nice to get to the bottom of why the deterministic arithmetic varies from run to run. There's nothing probabilistic in these tests. Globally setting .005 would be OK, too.
On Dec 3, 2019, at 11:12 AM, Marco Colombo ***@***.***> wrote:
This has hit again: https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/PR-1477/5/pipeline
Strangely it still reports 0.001 as tolerance, although it was changed to 0.005 in #1469:
./test/unit/math/expect_near_rel.hpp:39: Failure
The difference between x1 and x2 is 0.0010334642265417964, which exceeds tol, where
x1 evaluates to 0.0010334642265417964,
x2 evaluates to 0, and
tol evaluates to 0.001.
expect_near_rel_finite(0.0010334642265417964, 0, absolute tolerance = 0.001); absolute diff = 0.0010334642265417964 in: expect_near_rel; require items x1(i) = x2(i): hessian() Hessian
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
I would start from only setting the tolerance for the subtract_vec_mat test at 0.005. Up to now I think only the add and subtract tests have been playing funny, so perhaps this is enough.
On the other hand it would be interesting to see if it's possible to track down from the Jenkys or other backend logs if there is a unique instance of the Windows machines that is failing, and if so understand what is causing the failures (different compiler/hardware configurations?).
Running on gelman-group-win2 in C:\Jenkins2\workspace\Math_Pipeline_PR-1351
To find on what machine they run, go to Jenkins PR page in this case, click on run #10 then go to Console Output -> Full output now CTRL + F for Running on
Hmm. If it's not the OS, is it possible it's a different compiler or different compiler settings?
The problem is that deterministic tests are providing different behaviors at different times.
Could this be some kind of multi-threading or multi-process issue?
On Dec 4, 2019, at 3:25 AM, Rok Češnovar ***@***.***> wrote:
Thank you!
In that case it is something that needs further investigating. Will make a PR to fix the issue on develop and check if can reproduce this on Windows.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
I ran valgrind on the test before the fix, and it did complain about uninitialised values. It's worth keeping it in mind for the next time we see some unexpected behaviour such as this. When dust settles we should try reverting #1469 and #1483.
Activity
SteveBronder commentedon Nov 11, 2019
Also the tests pass locally for me. Not sure if they are setting something off in the MPI that means we need a flag somewhere
bob-carpenter commentedon Nov 12, 2019
I don't understand what's being proposed here. Did you want to revert #1424 for some reason? I couldn't tell from #1445 what's going wrong.
SteveBronder commentedon Nov 12, 2019
I'm looking into what's going on right now. Not sure if it's some weird interaction between something and MPI since the tests on the GPU node pass fine
SteveBronder commentedon Nov 12, 2019
Alright idk y but breaking them up into individual tests fixed it for one of the PRs. Gonna close this. @rok-cesnovar if you have time / think the
matrix_cl<var>PR can get in tmrw we can just leave the fix in there otherwise I can slam out a quick PR that just has those fixed upbob-carpenter commentedon Nov 13, 2019
SteveBronder commentedon Nov 13, 2019
I'm not sure either, something something curing the symptom and not the wound but we can just deal with those if they pop up as issues
rok-cesnovar commentedon Nov 28, 2019
Develop has just now failed with a similar error (see https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/develop/404/pipeline/142)
I will look into this tonight.
bob-carpenter commentedon Nov 28, 2019
The failure is this:
First, the failure's within acceptable bounds. I've had to lower precision on a lot of finite diff Hessian tests to 1e-2. So if I'd gotten this locally, I'd have just lowered tolerances.
The test (see below) doesn't have any randomness. That means arithmetic is changing on different runs. The test that's failing here is this one:
The
expect_adcode isn't using any kind of multi-threading or introducing any statics anywhere. I suspect it may be running with different compiler configs or different hardware config, both of which can change details of arithmetic precision.The easiest way to fix these is to include:
I added the forward mode because this report also shows up. The key is the
hessian_fvar() Hessianline. That indicates that a call to the functionalhessian_fvar()failed when computing the Hessian.The errors then follow that nomenclature in lower case to make it easy to update the tests without looking at the tolerances code (only took a few painful attempts to line up messages and constants before I did that).
Were other tests failing in different situations? It might make sense to just lower Hessian tolerance to 1e-2 globally, or even 5e-3, because we get lots of failures right around 1e-3.
rok-cesnovar commentedon Nov 30, 2019
There were 7 merges to develop and no tests failed here so I am closing this. Thanks to @bob-carpenter for providing the solution.
Develop did fail once with
/usr/local/opt/llvm@6/bin/clang++: /usr/local/opt/llvm@6/bin/clang++: cannot execute binary filebut I am assuming that is hopefully one time Jenkins issue.3 remaining items
bob-carpenter commentedon Dec 3, 2019
mcol commentedon Dec 3, 2019
I would start from only setting the tolerance for the
subtract_vec_mattest at 0.005. Up to now I think only the add and subtract tests have been playing funny, so perhaps this is enough.On the other hand it would be interesting to see if it's possible to track down from the Jenkys or other backend logs if there is a unique instance of the Windows machines that is failing, and if so understand what is causing the failures (different compiler/hardware configurations?).
rok-cesnovar commentedon Dec 4, 2019
@serban-nicusor-toptal would you be able to tell me if these two runs of "Windows Headers & Unit" were run on different Windows machines?
I know you told me once how to check this, but I forgot, sorry.
Hopefully its different machines, that would make this somewhat more expected behavior.
rok-cesnovar commentedon Dec 4, 2019
I tried looking at the pipeline.log in Artifacts but not sure what was run where.
serban-nicusor-toptal commentedon Dec 4, 2019
Both ran on the same machine
To find on what machine they run, go to Jenkins PR page in this case, click on run #10 then go to Console Output -> Full output now CTRL + F for
Running onrok-cesnovar commentedon Dec 4, 2019
Thank you!
In that case it is something that needs further investigating. Will make a PR to fix the issue on develop and check if can reproduce this on Windows.
bob-carpenter commentedon Dec 5, 2019
rok-cesnovar commentedon Jan 5, 2020
I think we will finally squashed this one with 744fea1
Turns out that we kept initializing the same variable while the rest were left uninitialized.
mcol commentedon Jan 5, 2020
I ran valgrind on the test before the fix, and it did complain about uninitialised values. It's worth keeping it in mind for the next time we see some unexpected behaviour such as this. When dust settles we should try reverting #1469 and #1483.
rok-cesnovar commentedon Jan 5, 2020
I am going to revert back to the default tolerance, which will essentially revert those PRs. Good call @mcol.