Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-15023

meas_modelfit is not compatible with Eigen 3.3.4

    XMLWordPrintable

    Details

    • Story Points:
      0.5
    • Sprint:
      AP F18-1
    • Team:
      Alert Production

      Description

      meas_modelfit has some issues with Eigen 3.3.4. I am making this a separate ticket from DM-14305 in hopes that these can be fixed in a way that is backwards compatible.

      The first issue is that this does not compile:

      ndarray::asEigenMatrix(*ix) = component._mu
          + std::sqrt(_df/rng.chisq(_df)) * (component._sigmaLLT.matrixL() * _workspace);
      

      but the solution to that is trivial: swap component._sigmaLLT.matrixL() and _workspace, though Jim Bosch suggested a solution that reduces duplication with nearby code.

      A more serious concern is that the following code in TruncatedGaussian.cc TruncatedGaussian::maximize raises an assertion error that a matrix is empty when running tests/test_truncatedGaussian.py:

      Eigen::FullPivLU<Matrix> solver(G.topLeftCorner(n - k, n - k));
      

      To fix that problem Jim Bosch suggests returning a vector of all zeros if n == k.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment -

            Looks good.

            For posterity, I believe the first of these problems is an Eigen bug, but the new code would be a bit better than the old code even if the bug did not exist.

            The second problem was almost certainly reliance on behavior in an edge context (zero-size matrices) where Eigen did not make any guarantees.

            Show
            jbosch Jim Bosch added a comment - Looks good. For posterity, I believe the first of these problems is an Eigen bug, but the new code would be a bit better than the old code even if the bug did not exist. The second problem was almost certainly reliance on behavior in an edge context (zero-size matrices) where Eigen did not make any guarantees.
            Hide
            rowen Russell Owen added a comment -

            Thanks for all your help with this Jim Bosch

            Show
            rowen Russell Owen added a comment - Thanks for all your help with this Jim Bosch

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Jim Bosch
              Watchers:
              Jim Bosch, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.