Skip to content

MacOS test-car.R failure #1456

@paciorek

Description

@paciorek

We are now seeing a MacOS test failure on test-car.R. It doesn't actually seem related to 1.2.0 (results below are based on nimble 1.1.0) though I do think it has just arisen. I'm wondering if it is because the runner (test machine) is now Apple Silicon.

Two of the three failures seem trivial - whereas formerly some R vs. C MCMC sample comparisons were identical, now they are different by about machine precision. I'm just adjusting those tests.

The third is troublesome. This is for the "dcar_proper gives correct likelihood with singular Cmatrix". This is a case where Cmatrix is singular, with three zero eigenvalues. eigen (i.e., Lapack) gives back (slightly) complex values. nimEigen (i.e., Eigen) on Linux gives back two NaNs (and one 6e-31) with a run-time warning about complex-valued eigenvector, so presumably behind the scenes the imaginary parts are being discarded. We set the NaNs to zero before passing the eigenvalues to dcar_proper to get a valid logProb.

Now on MacOS, nimEigen gives back all zeroes as the eigenvalues (with no warning about complex eigenvalues), and the logProb is incorrect. I don't know what to make of this. Most of the eigenvalues are real according to eigen() and Linux's nimEigen(). Also I can give it a different input matrix with complex eigenvalues and it gives me back a mix of real numbers (from the eigenvalues whose imaginary parts are 0) and NaNs, with a warning about complex eigenvalues where results match those of eigen(). So something about this particular matrix is causing problems.

Cmatrix is 25x25. If I use the upper 24x24 subset (or any other subset) everything seems fine.

Changing the example to be 4x4 or 6x6 instead of 5x5 (nHabRows, nHabCols) avoids the problem too.

So I am changing to 6x6.

:(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions