Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (8dd970f) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (8c63c37).

* trilinos-develop: (22 commits)
  Ifpack2: fix refcount related errors
  Percept: add .h files to install
  Adds more Ifpack2 preconditioned tests for different Belos solvers
  9184 winllvmparbuild: fix winllvm parallel builds with modification to muelu, zoltan2, belos (trilinos#9187)
  Revert "Ifpack2: correction to typo in long double file."
  Ifpack2: correction to typo in long double file.
  Kokkos: rolling back Kokkos changes from PR, per Christian's request.
  removed unused typedefs to reduce warnings
  Kokkos: correction to return type for routine.
  Teuchos: fixing 'warnings as errors' compilation issues that showed up w/ autotester tests.
  Tpetra: adding 'long double' test.
  Kokkos: adding ifdef guards around long double routines to prevent compilation in a CUDA build.
  Tpetra and Ifpack2: fixing issues with 'long double' template specializations not being compiled in Tpetra.
  Tpetra: adding some missing logic for 'long double' scalartype.  Still having issues with ETI enabled.  For some reason, Tpetra libs are not built with long double specialization like the rest of the Trilinos packages.
  Adding support for 'long double' scalar type when ETI is turned on.
  Kokkos: adding 'long double' specialization to Kokkos::Random.
  Teuchos: adding 'long double' specialization to SerializationTraits and ScalarTraits.
  Tpetra and Ifpack2: fixing issues with 'long double' template specializations not being compiled in Tpetra.
  Tpetra: adding some missing logic for 'long double' scalartype.  Still having issues with ETI enabled.  For some reason, Tpetra libs are not built with long double specialization like the rest of the Trilinos packages.
  Adding support for 'long double' scalar type when ETI is turned on.
  ...
  • Loading branch information
Charonops Jenkins Pipeline committed Jun 14, 2021
2 parents 8c63c37 + 8dd970f commit 822324c
Show file tree
Hide file tree
Showing 138 changed files with 12,286 additions and 143 deletions.
3 changes: 3 additions & 0 deletions cmake/CallbackSetupExtraOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ MACRO(TRIBITS_REPOSITORY_SETUP_EXTRA_OPTIONS)
SET(Trilinos_ENABLE_FLOAT OFF CACHE BOOL
"Enable the float scalar type in all Trilinos packages by default.")

SET(Trilinos_ENABLE_LONG_DOUBLE OFF CACHE BOOL
"Enable the long double scalar type in all Trilinos packages by default.")

SET(Trilinos_ENABLE_COMPLEX OFF CACHE BOOL
"Enable std::complex<T> scalar types in all Trilinos packages by default.")

Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosBiCGStabSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ namespace Belos {
static constexpr int defQuorum_default_ = 1;
static constexpr const char * resScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_,achievedTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosBlockCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,13 @@ namespace Belos {
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
static constexpr bool assertPositiveDefiniteness_default_ = true;
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver parameters and other values.
Expand Down
8 changes: 7 additions & 1 deletion packages/belos/src/BelosBlockGmresSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,13 @@ class BlockGmresSolMgr : public SolverManager<ScalarType,MV,OP> {
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
static constexpr std::ostream * outputStream_default_ = &std::cout;
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_, orthoKappa_, achievedTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosFixedPointSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,13 @@ namespace Belos {
static constexpr int outputStyle_default_ = Belos::General;
static constexpr int outputFreq_default_ = -1;
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver parameters and other values.
Expand Down
48 changes: 37 additions & 11 deletions packages/belos/src/BelosGCRODRSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,40 @@ Systems," SIAM Journal on Scientific Computing, 28(5), pp. 1651-1674,
class GCRODRSolMgr<ScalarType, MV, OP, true> :
public Details::SolverManagerRequiresLapack<ScalarType, MV, OP, true>
{

#if defined(HAVE_TEUCHOSCORE_CXX11)
# if defined(HAVE_TEUCHOS_COMPLEX)
static_assert (std::is_same<ScalarType, std::complex<float> >::value ||
std::is_same<ScalarType, std::complex<double> >::value ||
std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value,
"Belos::GCRODRSolMgr: ScalarType must be one of the four "
"types (S,D,C,Z) supported by LAPACK.");
#if defined(HAVE_TEUCHOS_LONG_DOUBLE)
static_assert (std::is_same<ScalarType, std::complex<float> >::value ||
std::is_same<ScalarType, std::complex<double> >::value ||
std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value ||
std::is_same<ScalarType, long double>::value,
"Belos::GCRODRSolMgr: ScalarType must be one of the four "
"types (S,D,C,Z) supported by LAPACK or long double (largely not impl'd).");
#else
static_assert (std::is_same<ScalarType, std::complex<float> >::value ||
std::is_same<ScalarType, std::complex<double> >::value ||
std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value,
"Belos::GCRODRSolMgr: ScalarType must be one of the four "
"types (S,D,C,Z) supported by LAPACK.");
#endif
# else
static_assert (std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value,
"Belos::GCRODRSolMgr: ScalarType must be float or double. "
"Complex arithmetic support is currently disabled. To "
"enable it, set Teuchos_ENABLE_COMPLEX=ON.");
#if defined(HAVE_TEUCHOS_LONG_DOUBLE)
static_assert (std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value ||
std::is_same<ScalarType, long double>::value,
"Belos::GCRODRSolMgr: ScalarType must be float, double or long double. "
"Complex arithmetic support is currently disabled. To "
"enable it, set Teuchos_ENABLE_COMPLEX=ON.");
#else
static_assert (std::is_same<ScalarType, float>::value ||
std::is_same<ScalarType, double>::value,
"Belos::GCRODRSolMgr: ScalarType must be float or double. "
"Complex arithmetic support is currently disabled. To "
"enable it, set Teuchos_ENABLE_COMPLEX=ON.");
#endif
# endif // defined(HAVE_TEUCHOS_COMPLEX)
#endif // defined(HAVE_TEUCHOSCORE_CXX11)

Expand Down Expand Up @@ -470,7 +490,13 @@ Systems," SIAM Journal on Scientific Computing, 28(5), pp. 1651-1674,
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convTol_, orthoKappa_, achievedTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosGmresPolyOp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ namespace Belos {
static constexpr const char * label_default_ = "Belos";
static constexpr const char * polyType_default_ = "Roots";
static constexpr const char * orthoType_default_ = "DGKS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif
static constexpr bool damp_default_ = false;
static constexpr bool addRoots_default_ = true;

Expand Down
8 changes: 7 additions & 1 deletion packages/belos/src/BelosGmresPolySolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,13 @@ class GmresPolySolMgr : public SolverManager<ScalarType,MV,OP> {
static constexpr bool addRoots_default_ = true;
static constexpr bool dampPoly_default_ = false;
static constexpr bool randomRHS_default_ = true;
static constexpr std::ostream * outputStream_default_ = &std::cout;
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType polyTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosPCPGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ namespace Belos {
static constexpr int outputFreq_default_ = -1;
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver values.
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosPseudoBlockCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ namespace Belos {
static constexpr bool foldConvergenceDetectionIntoAllreduce_default_ = false;
static constexpr const char * resScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif
static constexpr bool genCondEst_default_ = false;

// Current solver values.
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosPseudoBlockGmresSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,13 @@ namespace Belos {
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_, orthoKappa_, achievedTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosPseudoBlockStochasticCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,13 @@ namespace Belos {
static constexpr int defQuorum_default_ = 1;
static constexpr const char * resScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosPseudoBlockTFQMRSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,13 @@ namespace Belos {
static constexpr const char * impResScale_default_ = "Norm of Preconditioned Initial Residual";
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_, impTolScale_, achievedTol_;
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosRCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,13 @@ namespace Belos {
static constexpr int outputStyle_default_ = Belos::General;
static constexpr int outputFreq_default_ = -1;
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver values.
Expand Down
9 changes: 9 additions & 0 deletions packages/belos/src/BelosSolverManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ namespace Details {
public:
const static bool value = true;
};

#ifdef HAVE_TEUCHOS_LONG_DOUBLE
template<>
class LapackSupportsScalar<long double> {
public:
const static bool value = true;
};
#endif


#ifdef HAVE_TEUCHOS_COMPLEX
template<>
Expand Down
6 changes: 6 additions & 0 deletions packages/belos/src/BelosTFQMRSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ namespace Belos {
static constexpr const char * impResScale_default_ = "Norm of Preconditioned Initial Residual";
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_, impTolScale_, achievedTol_;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Teuchos_ConfigDefs.hpp"
#include "RTOpPack_ROpGetSubVector_decl.hpp"

#if defined(HAVE_RTOP_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "RTOpPack_ROpGetSubVector_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace RTOpPack {

TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(ROpGetSubVector)

} // namespace RTOpPack

#endif // HAVE_RTOP_EXCPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Teuchos_ConfigDefs.hpp"
#include "RTOpPack_RTOpTHelpers_decl.hpp"

#if defined(HAVE_RTOP_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "RTOpPack_RTOpTHelpers_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace RTOpPack {

TEUCHOS_MACRO_TEMPLATE_INSTANT_LONG_DOUBLE(RTOPPACK_RTOPT_HELPERS_INSTANT_SCALAR)

} // namespace RTOpPack

#endif // HAVE_RTOP_EXPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
15 changes: 15 additions & 0 deletions packages/ifpack2/adapters/thyra/RTOpPack_RTOpT_longdouble.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Teuchos_ConfigDefs.hpp"
#include "RTOpPack_RTOpT_decl.hpp"

#if defined(HAVE_RTOP_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "RTOpPack_RTOpT_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace RTOpPack {

TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(RTOpT)

} // namespace RTOpPack

#endif // HAVE_TEUCHOS_EXCPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Teuchos_ConfigDefs.hpp"
#include "RTOpPack_SPMD_apply_op_decl.hpp"

#if defined(HAVE_RTOP_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "RTOpPack_SPMD_apply_op_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace RTOpPack {

TEUCHOS_MACRO_TEMPLATE_INSTANT_LONG_DOUBLE(RTOPPACK_SPMD_APPLY_OP_INSTANT_SCALAR)

} // namespace RTOpPack

#endif // HAVE_RTOP_EXPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Teuchos_ConfigDefs.hpp"
#include "RTOpPack_TOpLinearCombination.hpp"

#if defined(HAVE_RTOP_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "RTOpPack_TOpLinearCombination_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace RTOpPack {

TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(TOpLinearCombination)

} // namespace RTOpPack

#endif // HAVE_RTOP_EXCPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "Teuchos_ConfigDefs.hpp"
#include "Thyra_ConfigDefs.hpp"

#if defined(HAVE_THYRA_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "Thyra_DefaultColumnwiseMultiVector_decl.hpp"
#include "Thyra_DefaultColumnwiseMultiVector_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace Thyra {

TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(DefaultColumnwiseMultiVector)

} // namespace Thyra

#endif // HAVE_THYRA_EXPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "Teuchos_ConfigDefs.hpp"
#include "Thyra_ConfigDefs.hpp"

#if defined(HAVE_THYRA_EXPLICIT_INSTANTIATION) && defined(HAVE_TEUCHOS_LONG_DOUBLE)

#include "Thyra_DefaultPreconditioner_decl.hpp"
#include "Thyra_DefaultPreconditioner_def.hpp"
#include "Teuchos_ExplicitInstantiationHelpers.hpp"

namespace Thyra {

TEUCHOS_CLASS_TEMPLATE_INSTANT_LONG_DOUBLE(DefaultPreconditioner)

} // namespace Thyra

#endif // HAVE_THYRA_EXPLICIT_INSTANTIATION && HAVE_TEUCHOS_LONG_DOUBLE
Loading

0 comments on commit 822324c

Please sign in to comment.