Skip to content

kokkos-kernels: Fix #3493 (incorrect dot product results & segfaults for complex Tpetra::MultiVector)

James Willenbring requested to merge mhoemmen:Fix-3493 into develop

Created by: mhoemmen

@trilinos/tpetra @trilinos/kokkos-kernels @kddevin @kyungjoo-kim

Description

KokkosBlas::dot for 1-D Views gave incorrect complex dot product results, due to incorrect assumptions about the Fortran ABI for complex return values. This made Tpetra tests fail with complex enabled. I fixed this by patching kokkos-kernels not to use the BLAS for those functions.

NOTE: I have not yet patched kokkos-kernels. https://github.com/kokkos/kokkos-kernels/issues/307 discusses various ways to fix the issue. I would prefer to let kokkos-kernels developers decide how to do that in a more permanent way.

Motivation and Context

Salinas uses Tpetra with complex arithmetic.

Related Issues

How Has This Been Tested?

Mac, Clang, OpenMPI.

Checklist

  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • I have read the code contribution guidelines for this project.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.

Merge request reports