TpetraCore tests fails to build during installation testing
Created by: bavier
Trilinos 12.6.1 configured with
cmake \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=NO \
-DTrilinos_ENABLE_Tpetra:BOOL=YES \
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=NO \
-DTrilinos_ENABLE_TESTS:BOOL=NO \
-DTPL_BLAS_LIBRARIES=openblas \
-DCMAKE_INSTALL_PREFIX:PATH=/ptmp/trilinos-tpetra \
..
And then configuring for installation-testing with
cmake \
-DTrilinos_INSTALLATION_DIR=/ptmp/trilinos-tpetra \
-DTrilinos_ENABLE_Tpetra:BOOL=YES \
-DTrilinos_ENABLE_TESTS:BOOL=YES \
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=NO \
..
Leads to the following error from make
:
In file included from /ptmp/trilinos-tpetra/lib/cmake/TpetraCore/../../../include/Tpetra_CrsMatrixSolveOp_decl.hpp:50:0,
from /ptmp/trilinos-tpetra/lib/cmake/TpetraCore/../../../include/Tpetra_CrsMatrixSolveOp.hpp:1,
from /ptmp/Trilinos/packages/tpetra/core/test/BugTests/CompilationTests.cpp:50:
/ptmp/trilinos-tpetra/lib/cmake/TpetraCore/../../../include/Tpetra_CrsMatrixSolveOp.hpp:2:43: fatal error: Tpetra_CrsMatrixSolveOp_def.hpp: No such file or directory
#include "Tpetra_CrsMatrixSolveOp_def.hpp"
^
compilation terminated.
packages/tpetra/core/test/BugTests/CMakeFiles/TpetraCore_CompilationTests.dir/build.make:62: recipe for target 'packages/tpetra/core/test/BugTests/CMakeFiles/TpetraCore_CompilationTests.dir/CompilationTests.cpp.o' failed
make[2]: *** [packages/tpetra/core/test/BugTests/CMakeFiles/TpetraCore_CompilationTests.dir/CompilationTests.cpp.o] Error 1
CMakeFiles/Makefile2:3011: recipe for target 'packages/tpetra/core/test/BugTests/CMakeFiles/TpetraCore_CompilationTests.dir/all' failed
make[1]: *** [packages/tpetra/core/test/BugTests/CMakeFiles/TpetraCore_CompilationTests.dir/all] Error 2
With ETI enabled, the error is a bit different
[ 38%] Building CXX object packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/CrsMatrix_TriSolve.cpp.o
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp:107:17: error: 'Tpetra::createCrsMatrixSolveOp' has not been declared
using Tpetra::createCrsMatrixSolveOp;
^
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp: In member function 'void {anonymous}::CrsMatrix_EmptyTriSolve_UnitTest<LO, GO, Scalar, Node>::runUnitTestImpl(Teuchos::FancyOStream&, bool&) const':
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp:176:19: error: 'createCrsMatrixSolveOp' was not declared in this scope
ZeroIOp = createCrsMatrixSolveOp<Scalar>(ZeroMat.getConst());
^
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp:176:48: error: expected primary-expression before '>' token
ZeroIOp = createCrsMatrixSolveOp<Scalar>(ZeroMat.getConst());
^
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp: In member function 'void {anonymous}::CrsMatrix_TriSolve_UnitTest<LO, GO, Scalar, Node>::runUnitTestImpl(Teuchos::FancyOStream&, bool&) const':
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp:396:18: error: 'createCrsMatrixSolveOp' was not declared in this scope
AIOp = createCrsMatrixSolveOp<Scalar> (AMat.getConst ());
^
/ptmp/Trilinos/packages/tpetra/core/test/CrsMatrix/CrsMatrix_TriSolve.cpp:396:47: error: expected primary-expression before '>' token
AIOp = createCrsMatrixSolveOp<Scalar> (AMat.getConst ());
^
packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/build.make:62: recipe for target 'packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/CrsMatrix_TriSolve.cpp.o' failed
make[2]: *** [packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/CrsMatrix_TriSolve.cpp.o] Error 1
CMakeFiles/Makefile2:3562: recipe for target 'packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/all' failed
make[1]: *** [packages/tpetra/core/test/CrsMatrix/CMakeFiles/TpetraCore_CrsMatrix_TriSolve.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
These errors appear to be a result of how the TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS cmake macro interacts with the tpetra/core/src/Tpetra_CrsMatrixSolveOp.hpp header. The macro generates a header of the same name in CMAKE_CURRENT_BINARY_DIR. This generated header is then installed and picked up during installation testing. The tests build without error during pre-installation testing because the original header is found in CMAKE_CURRENT_SOURCE_DIR before it is found in CMAKE_CURRENT_BINARY_DIR.