Skip to content

Fixes randomization issue with Teuchos::SerialDenseMatrix in parallel

James Willenbring requested to merge hkthorn:develop into develop

Created by: hkthorn

While addressing issue #2473 (closed), I found other places where a random serial dense matrix was used and expected to be the same in parallel. The synchronization method that was used to address the issue in Anasazi has been moved to the Teuchos serial dense helpers file so that other packages can use this utility in the generation of tests. In particular, this utility needed to be integrated into the MVOP testers for Belos and Anasazi, as well as the Belos orthogonalization tester.

The assumption that a call to generate a random variable will return the same value on all processors is false and could have unknown consequences for testing.

While it is unknown if any random failures can be tracked to these changes at this time, previous issues with Anasazi have been caused by this bad assumption. So, it is better to fix it.

@trilinos/anasazi @trilinos/belos

Description

Moved the utility for generating a synchronized Teuchos::SerialDenseMatrix from Anasazi to the serial dense helpers in Teuchos. This utility is also necessary for fixing the behavior of the MVOPTester and OrthoTester in Belos. Other uses of random serial dense matrices, where they were expected to be the same on all processor, have been removed from Anasazi and Belos.

Motivation and Context

It is a bad assumption that a random number generator will return the same number in parallel on all processors. This was the reason for bug number #2473 (closed), so it should be removed from testing so that it does not result in further failures.

How Has This Been Tested?

OS X with GNU 7.x compilers.

Checklist

  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.
  • These changes break backwards compatibility.

Merge request reports