Tpetra: configure error using COMPLEX_DOUBLE and FLOAT types
Created by: ajpowel
@trilinos/Tpetra
Expectations
We do not want to turn on Trilinos_ENABLE_COMPLEX_FLOAT if we are also using Trilinos_ENABLE_FLOAT and Trilinos_ENABLE_COMPLEX_DOUBLE. Is the current behavior (below) correct?
Current Behavior
Processing enabled package: Tpetra (Classic, TSQR, Core) -- Tpetra: Enabling deprecated code -- Determine whether Tpetra will assume that MPI is CUDA aware: -- - Tpetra_ENABLE_CUDA is OFF, so Tpetra will assume that MPI is not CUDA aware. -- Tpetra execution space availability (ON means available): -- - Serial: ON -- - Threads: OFF -- - OpenMP: OFF -- - Cuda: OFF CMake Error at packages/tpetra/CMakeLists.txt:986 (MESSAGE): Tpetra: Tpetra_INST_COMPLEX_FLOAT is OFF (meaning that you want to disable explicit instantiation and/or tests of Tpetra with Scalar = std::complex), but Teuchos_ENABLE_COMPLEX is ON and Teuchos_ENABLE_FLOAT is ON. This will cause downstream link errors, likely in Thyra or Stratimikos. See GitHub Issue 4080 for details. Best practice: Do NOT set Tpetra_INST_COMPLEX_FLOAT, Teuchos_ENABLE_COMPLEX, or Teuchos_ENABLE_FLOAT explicitly. Instead, set Trilinos_ENABLE_COMPLEX_FLOAT explicitly. That will set defaults for Teuchos and Tpetra correctly.
-- Configuring incomplete, errors occurred! See also "/scratch/ajpowel/code_032119/fix_trilly/CMakeFiles/CMakeOutput.log". See also "/scratch/ajpowel/code_032119/fix_trilly/CMakeFiles/CMakeError.log".
Motivation and Context
Sierra-Trilinos integration
Steps to Reproduce
cmake -DTrilinos_ENABLE_Tpetra=ON -DTrilinos_ENABLE_COMPLEX_DOUBLE=ON -DTrilinos_ENABLE_FLOAT=ON -DTrilinos_ENABLE_Teuchos=ON $PATH_TO_MY_SOURCE_CODE