Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anasazi: Build error with Scalar=complex<float> enabled #6612

Closed
mhoemmen opened this issue Jan 19, 2020 · 0 comments
Closed

Anasazi: Build error with Scalar=complex<float> enabled #6612

mhoemmen opened this issue Jan 19, 2020 · 0 comments
Labels
impacting: configure or build The issue is primarily related to configuring or building pkg: Anasazi type: bug The primary issue is a bug in Trilinos code or tests

Comments

@mhoemmen
Copy link
Contributor

Bug Report

@trilinos/anasazi

Description

anasazi/src/AnasaziMVOpTester.hpp has code like this:

     ScalarType alpha = 0.5 * SCT::one(),
                 beta = 0.33 * SCT::one();

SCT is Teuchos::ScalarTraits<Scalar>. When Scalar is complex<float>, this code does not compile, because operator*(double, complex<float>) does not exist. The fix is to cast the constants 0.5 and 0.33 to MagType (which is float in this case):

     ScalarType alpha = MagType(0.5) * SCT::one();
     ScalarType beta = MagType(0.33) * SCT::one();

Steps to Reproduce

  1. Set Trilinos_ENABLE_COMPLEX_FLOAT:BOOL=ON.
  2. Build Trilinos (I'm using Mac Clang).

Related to

#4196

@mhoemmen mhoemmen added type: bug The primary issue is a bug in Trilinos code or tests pkg: Anasazi impacting: configure or build The issue is primarily related to configuring or building labels Jan 19, 2020
mhoemmen added a commit that referenced this issue Jan 23, 2020
jmgate pushed a commit to tcad-charon/Trilinos that referenced this issue Jan 24, 2020
…s:develop' (a7632d8).

* trilinos-develop:
  Tpetra,kokkos-kernels: Fix trilinos#6633
  Reformulates the driver in a residual form. That is, we invoke Vcycles to correct the existing solution using the residual as the right hand side.  We then removes a few matvecs and some setup stages that are not actually needed. In particular, we take advantage of the fact that the initial guess is zero on the presmoothing side of the MG cycle. Also removed the smoother setup for the coarsest region level when we have not requested to smooth on this level.
  Tpetra: Add debug output to sparse matrix-matrix multiply test
  Belos: Fix test build failure on Mac Clang (missing header)
  Tpetra: Fix Scalar=float BCRS test failure on Mac Clang
  Anasazi: Fix trilinos#6612
  Tpetra: Fix trilinos#6611
jmgate pushed a commit to tcad-charon/Trilinos that referenced this issue Jan 24, 2020
…s:develop' (a7632d8).

* trilinos-develop:
  Tpetra,kokkos-kernels: Fix trilinos#6633
  Reformulates the driver in a residual form. That is, we invoke Vcycles to correct the existing solution using the residual as the right hand side.  We then removes a few matvecs and some setup stages that are not actually needed. In particular, we take advantage of the fact that the initial guess is zero on the presmoothing side of the MG cycle. Also removed the smoother setup for the coarsest region level when we have not requested to smooth on this level.
  Tpetra: Add debug output to sparse matrix-matrix multiply test
  Belos: Fix test build failure on Mac Clang (missing header)
  Tpetra: Fix Scalar=float BCRS test failure on Mac Clang
  Anasazi: Fix trilinos#6612
  Tpetra: Fix trilinos#6611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impacting: configure or build The issue is primarily related to configuring or building pkg: Anasazi type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

1 participant