From 165cd4024363bbe07449b05a9873384ceb7829a0 Mon Sep 17 00:00:00 2001 From: Mark Hoemmen Date: Tue, 15 Jan 2019 09:31:31 -0700 Subject: [PATCH 1/2] Tpetra: Fix warnings in unpackCrsGraphAndCombine & Import @trilinos/tpetra --- .../core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp | 1 - packages/tpetra/core/src/Tpetra_Import_def.hpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/tpetra/core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp b/packages/tpetra/core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp index 0edfb5b9e98d..948d381dca21 100644 --- a/packages/tpetra/core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp +++ b/packages/tpetra/core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp @@ -358,7 +358,6 @@ unpackAndCombine( // Resize row pointers and indices to accommodate incoming data auto padding = computeCrsPadding( num_packets_per_lid, import_lids, unpack_pids); - using padding_type = decltype(padding); padCrsArrays(row_ptrs_beg, row_ptrs_end, indices, padding); // Get the offsets diff --git a/packages/tpetra/core/src/Tpetra_Import_def.hpp b/packages/tpetra/core/src/Tpetra_Import_def.hpp index ab305aff758a..f8fe88306ec9 100644 --- a/packages/tpetra/core/src/Tpetra_Import_def.hpp +++ b/packages/tpetra/core/src/Tpetra_Import_def.hpp @@ -309,7 +309,7 @@ namespace Tpetra { typedef GlobalOrdinal GO; typedef Teuchos::Array::size_type size_type; typedef ImportExportData data_type; - const int myRank = source->getComm ()->getRank (); + // Read "Debug" parameter from the input ParameterList. bool debug = tpetraImportDebugDefault; if (! plist.is_null ()) { @@ -345,7 +345,7 @@ namespace Tpetra { tRemoteGIDs.size() == tRemoteLIDs.size()), std::runtime_error, "Import::Import createExpert version: Size miss match on userRemotePIDs, remoteGIDs and remoteLIDs Array's to sort3. This will produce produce an error, aborting "); - + sort3 (tRemotePIDs.begin (), tRemotePIDs.end (), tRemoteGIDs.begin (), From 3292b69cb3ce17ef3c15bc284995d7f3571cdd7b Mon Sep 17 00:00:00 2001 From: Mark Hoemmen Date: Tue, 15 Jan 2019 10:15:01 -0700 Subject: [PATCH 2/2] Amesos2: Fix #4194 (macros in Solver_Test.cpp breaking build) @trilinos/amesos2 --- packages/amesos2/test/solvers/Solver_Test.cpp | 511 +++++------------- 1 file changed, 136 insertions(+), 375 deletions(-) diff --git a/packages/amesos2/test/solvers/Solver_Test.cpp b/packages/amesos2/test/solvers/Solver_Test.cpp index 6d2acb335554..050bdc96874e 100644 --- a/packages/amesos2/test/solvers/Solver_Test.cpp +++ b/packages/amesos2/test/solvers/Solver_Test.cpp @@ -1101,504 +1101,265 @@ bool test_tpetra(const string& mm_file, success &= run_success + using default_go_type = Tpetra::Map<>::global_ordinal_type; + // I can't think of any better way to do the types as // specified in the parameter list at runtime but to branch // out on all possibilities, sorry... Note: we're going to // ignore the `node' parameter for now -#if !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) || ((defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) && (defined HAVE_TPETRA_INST_FLOAT)) if( scalar == "float" ){ +#ifdef HAVE_TPETRA_INST_FLOAT if( lo == "int" ){ - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(float,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(float,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(float,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION -#ifdef HAVE_TPETRA_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(float,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INST_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(float,int,long long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG_LONG } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION } -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION else if( lo == "long int" ){ - - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(float,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(float,long int,long int,DN); - } - -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(float,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(float,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(float,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION +#else // NOT HAVE_TPETRA_INST_FLOAT + *fos << "Scalar=float was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_FLOAT } // end scalar == "float" -#endif // HAVE_TPETRA_INST_FLOAT -#if !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) || ((defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) && (defined HAVE_TPETRA_INST_DOUBLE)) + if( scalar == "double" ){ +#ifdef HAVE_TPETRA_INST_DOUBLE if( lo == "int" ){ if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(double,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(double,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(double,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION -#ifdef HAVE_TPETRA_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(double,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(double,int,long long int,DN); +#else // NOT HAVE_TPETRA_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INT_LONG_LONG } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION } -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION else if( lo == "long int" ){ - - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(double,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(double,long int,long int,DN); - } - -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(double,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(double,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(double,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION +#else // NOT HAVE_TPETRA_INST_DOUBLE + *fos << "Scalar=double was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_DOUBLE } // end scalar == "double" -#endif // HAVE_TPETRA_INST_DOUBLE -#if (defined HAVE_TEUCHOS_QD) && !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) + if( scalar == "double double" ){ +#ifdef HAVE_TPETRA_INST_DD_REAL if( lo == "int" ){ - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INST - AMESOS2_SOLVER_TPETRA_TEST(dd_real,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(dd_real,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(dd_real,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifdef HAVE_TPETRA_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(dd_real,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(dd_real,int,long long int,DN); +#else // NOT HAVE_TPETRA_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INT_LONG_LONG } -#endif } else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(dd_real,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(dd_real,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(dd_real,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(dd_real,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(dd_real,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif +#else // NOT HAVE_TPETRA_INST_DD_REAL + *fos << "Scalar=dd_real was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_DD_REAL } // end scalar == "double double" + if( scalar == "quad" || scalar == "quad double" ){ +#ifdef HAVE_TPETRA_INST_QD_REAL if( lo == "int" ){ - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(qd_real,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(qd_real,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(qd_real,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifdef HAVE_TPETAR_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(qd_real,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(qd_real,int,long long int,DN); +#else // NOT HAVE_TPETRA_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INT_LONG_LONG } -#endif } else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(qd_real,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(qd_real,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(qd_real,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(qd_real,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(qd_real,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif +#else // NOT HAVE_TPETRA_INST_QD_REAL + *fos << "Scalar=qd_real was not enabled at configure time" << std::endl; +#endif // HAVE_TPETRA_INST_QD_REAL } // end scalar == "quad double" -#endif // HAVE_TEUCHOS_QD -#ifdef HAVE_TEUCHOS_COMPLEX + if( scalar == "complex" ){ -#if !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) || ((defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) && (defined HAVE_TPETRA_INST_COMPLEX_FLOAT) && !(defined HAVE_AMESOS2_KLU2)) if( mag == "float" ){ +#ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT typedef std::complex cmplx; if( lo == "int" ){ if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(cmplx,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(cmplx,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(cmplx,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION -#ifdef HAVE_TPETRA_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(cmplx,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(cmplx,int,long long int,DN); +#else // NOT HAVE_TPETRA_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INT_LONG_LONG } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION } -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION +#else // NOT HAVE_TPETRA_INST_COMPLEX_FLOAT + *fos << "Scalar=complex was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_COMPLEX_FLOAT } -#endif -#if !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) || ((defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) && (defined HAVE_TPETRA_INST_COMPLEX_DOUBLE)) + if( mag == "double" ){ +#ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE typedef std::complex cmplx_double; if( lo == "int" ){ - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,int,int,DN); -#endif + AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,int,default_go_type,DN); } -#ifdef HAVE_TPETRA_INST_INT_INT else if( go == "int" ){ +#ifdef HAVE_TPETRA_INST_INT_INT AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,int,int,DN); +#else // NOT HAVE_TPETRA_INST_INT_INT + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_INT_INT } -#endif -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION -#ifdef HAVE_TPETRA_INST_INT_LONG else if( go == "long int" ){ +#ifdef HAVE_TPETRA_INST_INT_LONG AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,int,long int,DN); +#else // NOT HAVE_TPETRA_INST_INT_LONG + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_INT_LONG } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( go == "long long int" ){ +#ifdef HAVE_TPETRA_INT_LONG_LONG AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,int,long long int,DN); +#else // NOT HAVE_TPETRA_INT_LONG_LONG + *fos << "GO=" << go << " was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INT_LONG_LONG } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION } -#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,long int,long long int,DN); - } -#endif + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#ifdef HAVE_TPETRA_INT_LONG_LONG else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_double,long long int,long long int,DN); - } + *fos << "Trilinos does not currently support LO=" << lo << std::endl; } -#endif -#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION +#else // NOT HAVE_TPETRA_INST_COMPLEX_DOUBLE + *fos << "Scalar=complex was not enabled at configure time" + << std::endl; +#endif // HAVE_TPETRA_INST_COMPLEX_DOUBLE } // end mag == "double" -#endif -#if (defined HAVE_TEUCHOS_QD) && !(defined HAVE_AMESOS2_EXPLICIT_INSTANTIATION) - if( mag == "double double" ){ - typedef std::complex cmplx_dd; - if( lo == "int" ){ - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,int,int,DN); -#endif - } -#ifdef HAVE_TPETRA_INST_INT_INT - else if( go == "int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,int,int,DN); - } -#endif -#ifdef HAVE_TPETRA_INST_INT_LONG - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,int,long int,DN); - } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,int,long long int,DN); - } -#endif - } - else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,long int,long long int,DN); - } -#endif - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_dd,long long int,long long int,DN); - } - } -#endif - } // end scalar == "double double" - else if( mag == "quad" || mag == "quad double" ){ - typedef std::complex cmplx_qd; - if( lo == "int" ){ + // mfh 15 Jan 2019: The code used to test + // Scalar=std::complex and std::complex + // here. The C++ Standard does not permit portable use of + // std::complex for T != float, double, or long double. + // Thus, I deleted those cases, which almost certainly were + // never tested, even if they ever built. - if( go == "default" ){ -#ifdef HAVE_TPETRA_INST_INT_INT - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,int,int,DN); -#endif - } -#ifdef HAVE_TPETRA_INST_INT_INT - else if( go == "int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,int,int,DN); - } -#endif -#ifdef HAVE_TPETRA_INST_INT_LONG - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,int,long int,DN); - } -#endif -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,int,long long int,DN); - } -#endif - } - else if( lo == "long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,long int,long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,long int,long int,DN); - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,long int,long long int,DN); - } -#endif - } -#ifdef HAVE_TPETRA_INT_LONG_LONG - else if( lo == "long long int" ){ - if( go == "default" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,long long int,long long int,DN); - } - else if( go == "int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long int" ){ - *fos << "May not have global ordinal with size smaller than local ordinal" << std::endl; - } - else if( go == "long long int" ){ - AMESOS2_SOLVER_TPETRA_TEST(cmplx_qd,long long int,long long int,DN); - } - } -#endif - } // end scalar == "quad double" -#endif // HAVE_TEUCHOS_QD - } // end if( scalar == "complex" ) -#endif // HAVE_TEUCHOS_COMPLEX + } // scalar == "complex" if( !test_done && verbosity > 1 ){ *fos << "type parameters not recognized or enabled" << std::endl;