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

Afw fails unit test for convolve depending on compiler optimisation level

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Templates:
    • Story Points:
      2
    • Sprint:
      DRP X16-2, DRP X16-3, DRP F16-1
    • Team:
      Data Release Production

      Description

      On OSX 10.11.4 with Apple LLVM version 7.3.0 (clang-703.0.29) afw fails test/convolve.py with the following error when either -O0 or -O1 is enabled but works fine for -O2 and -O3.

      tests/convolve.py
       
      .....FF/Users/pschella/Development/lsst/code/afw/python/lsst/afw/image/testUtils.py:283: RuntimeWarning: invalid value encountered in isnan
        nan0 = np.isnan(filledArr0)
      /Users/pschella/Development/lsst/lsstsw/miniconda/lib/python2.7/site-packages/numpy/lib/ufunclike.py:113: RuntimeWarning: invalid value encountered in isinf
        nx.logical_and(nx.isinf(x), ~nx.signbit(x), y)
      /Users/pschella/Development/lsst/lsstsw/miniconda/lib/python2.7/site-packages/numpy/lib/ufunclike.py:176: RuntimeWarning: invalid value encountered in isinf
        nx.logical_and(nx.isinf(x), nx.signbit(x), y)
      F.F...
      ======================================================================
      FAIL: testSpatiallyVaryingAnalyticConvolve (__main__.ConvolveTestCase)
      Test in-place convolution with a spatially varying AnalyticKernel
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/convolve.py", line 437, in testSpatiallyVaryingAnalyticConvolve
          rtol = rtol)
        File "tests/convolve.py", line 290, in runStdTest
          self.runBasicConvolveEdgeTest(kernel, kernelDescr)
        File "tests/convolve.py", line 317, in runBasicConvolveEdgeTest
          doVariance = True, rtol=0, atol=0, msg=msg)
        File "/Users/pschella/Development/lsst/code/afw/python/lsst/afw/image/testUtils.py", line 201, in assertMaskedImagesNearlyEqual
          testCase.fail("%s: %s" % (msg, "; ".join(errStrList)))
      AssertionError: basicConvolve(MaskedImage, kernel=Spatially Varying Gaussian Analytic Kernel using brute force) wrote to edge pixels: image planes differ: maxDiff=1.09176e+38 at position (73, 18); value=-1.09176e+38 vs. 2825.0; NaNs differ
       
      ======================================================================
      FAIL: testSpatiallyVaryingDeltaFunctionLinearCombination (__main__.ConvolveTestCase)
      Test convolution with a spatially varying LinearCombinationKernel of delta function basis kernels.
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/convolve.py", line 556, in testSpatiallyVaryingDeltaFunctionLinearCombination
          rtol = rtol)
        File "tests/convolve.py", line 290, in runStdTest
          self.runBasicConvolveEdgeTest(kernel, kernelDescr)
        File "tests/convolve.py", line 317, in runBasicConvolveEdgeTest
          doVariance = True, rtol=0, atol=0, msg=msg)
        File "/Users/pschella/Development/lsst/code/afw/python/lsst/afw/image/testUtils.py", line 201, in assertMaskedImagesNearlyEqual
          testCase.fail("%s: %s" % (msg, "; ".join(errStrList)))
      AssertionError: basicConvolve(MaskedImage, kernel=Spatially varying LinearCombinationKernel of delta function kernels using brute force) wrote to edge pixels: image planes differ: maxDiff=9.06659e+36 at position (75, 29); value=9.06659e+36 vs. 2865.0
       
      ======================================================================
      FAIL: testSpatiallyVaryingGaussianLinerCombination (__main__.ConvolveTestCase)
      Test convolution with a spatially varying LinearCombinationKernel of two Gaussian basis kernels.
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/convolve.py", line 523, in testSpatiallyVaryingGaussianLinerCombination
          rtol = rtol)
        File "tests/convolve.py", line 290, in runStdTest
          self.runBasicConvolveEdgeTest(kernel, kernelDescr)
        File "tests/convolve.py", line 317, in runBasicConvolveEdgeTest
          doVariance = True, rtol=0, atol=0, msg=msg)
        File "/Users/pschella/Development/lsst/code/afw/python/lsst/afw/image/testUtils.py", line 201, in assertMaskedImagesNearlyEqual
          testCase.fail("%s: %s" % (msg, "; ".join(errStrList)))
      AssertionError: basicConvolve(MaskedImage, kernel=Spatially Varying Gaussian Analytic Kernel with 3 basis kernels convolved using brute force) wrote to edge pixels: image planes differ: maxDiff=1.22472e+38 at position (74, 3); value=-1.22472e+38 vs. 2878.0; NaNs differ
       
      ======================================================================
      FAIL: testTicket873 (__main__.ConvolveTestCase)
      Demonstrate ticket 873: convolution of a MaskedImage with a spatially varying
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/convolve.py", line 623, in testTicket873
          rtol = rtol)
        File "tests/convolve.py", line 290, in runStdTest
          self.runBasicConvolveEdgeTest(kernel, kernelDescr)
        File "tests/convolve.py", line 317, in runBasicConvolveEdgeTest
          doVariance = True, rtol=0, atol=0, msg=msg)
        File "/Users/pschella/Development/lsst/code/afw/python/lsst/afw/image/testUtils.py", line 201, in assertMaskedImagesNearlyEqual
          testCase.fail("%s: %s" % (msg, "; ".join(errStrList)))
      AssertionError: basicConvolve(MaskedImage, kernel=Spatially varying LinearCombinationKernel of basis kernels with low covariance, using brute force) wrote to edge pixels: image planes differ: maxDiff=3.19374e+38 at position (1, 46); value=3.19374e+38 vs. 2774.0
       
      ----------------------------------------------------------------------
      Ran 13 tests in 43.252s
       
      FAILED (failures=4)
      The following tests failed:
      /Users/pschella/Development/lsst/code/afw/tests/.tests/convolve.py.failed
      1 tests failed
      scons: *** [checkTestStatus] Error 1
      scons: building terminated because of errors.
      

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  pschella Pim Schellart
                  Reporter:
                  pschella Pim Schellart
                  Reviewers:
                  John Swinbank
                  Watchers:
                  Jim Bosch, John Swinbank, Nate Lust, Pim Schellart, Tim Jenness
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel