Skip to content

Commit

Permalink
Merge origin/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kliegeois committed Oct 18, 2023
2 parents 89501b0 + 0134f8e commit 418504c
Show file tree
Hide file tree
Showing 426 changed files with 46,882 additions and 5,660 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ SET(${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION_DEFAULT FALSE

SET(Trilinos_USE_GNUINSTALLDIRS_DEFAULT ON)

SET(Trilinos_MUST_FIND_ALL_TPL_LIBS_DEFAULT TRUE)

# Set up C++ language standard selection
include(SetTrilinosCxxStandard)

Expand All @@ -107,8 +109,6 @@ INSTALL_BUILD_STATS_SCRIPTS()
# Install TriBITS so that other projects can use it
include(SetupTribitsInstall)

SET(Trilinos_MUST_FIND_ALL_TPL_LIBS_DEFAULT TRUE)

IF(${PROJECT_NAME}_ENABLE_YouCompleteMe)
INCLUDE(CodeCompletion)
ENDIF()
Expand Down
27 changes: 0 additions & 27 deletions cmake/RepositoryDependenciesSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
# endif()
# endif()

#########################################################################
# STKBalance does not work with GO=INT or GO=UNSIGNED
# Note and disable it if it was set as a dependence of STK
# Error out if it was explicitly requested by user

SET(KDD_INT_INT OFF) # Current default
SET(KDD_INT_UNSIGNED OFF) # Current default
SET(KDD_INT_LONG OFF) # Current default
Expand Down Expand Up @@ -47,28 +42,6 @@ IF(NOT ("${Tpetra_INST_INT_LONG_LONG}" STREQUAL ""))
SET(KDD_INT_LONG_LONG ${Tpetra_INST_INT_LONG_LONG})
ENDIF()

IF ((NOT ${KDD_INT_LONG}) AND (NOT ${KDD_INT_LONG_LONG}))
IF ("${${PROJECT_NAME}_ENABLE_STKBalance}" STREQUAL "")
# STKBalance may be enabled but only implicitly (as a dependence of STK);
# give a message but turn off STKBalance support
MESSAGE("NOTE: int global indices are enabled in Trilinos. "
"Because STKBalance requires long or long long "
"global indices, STKBalance will be disabled. "
"To make this warning go away, do not request "
"int global indices in Trilinos (that is, do not "
"set Tpetra_INST_INT_INT=ON or "
"Tpetra_INST_INT_UNSIGNED=ON)." )
SET(${PROJECT_NAME}_ENABLE_STKBalance OFF)
ELSEIF (${PROJECT_NAME}_ENABLE_STKBalance)
# STKBalance was explicitly enabled by the user, so error out
MESSAGE(FATAL_ERROR
"STKBalance requires long or long long global indices, "
"but Trilinos is using int indices "
"(likely via Tpetra_INST_INT_INT or Tpetra_INST_INT_UNSIGNED). "
"Disable STKBalance or specify Tpetra_INST_INT_LONG_LONG.")
ENDIF()
ENDIF()

# Tpetra supports only one GO type at a time, and the default is long long.
# Epetra uses GO=int. To support both libraries, Xpetra requires they use
# the same GO. So if Tpetra's GO is not INT (either the default long long,
Expand Down
13 changes: 12 additions & 1 deletion cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ set(CTEST_CMAKE_GENERATOR "Ninja")

set(CTEST_CONFIGURE_COMMAND_ARGS
"${CMAKE_COMMAND}"
"-C \"${configure_file}\""
)

if(USE_EXPLICIT_TRILINOS_CACHEFILE)
list(APPEND CTEST_CONFIGURE_COMMAND_ARGS
"-D Trilinos_CONFIGURE_OPTIONS_FILE=${configure_file}"
)
else()
list(APPEND CTEST_CONFIGURE_COMMAND_ARGS
"-C \"${configure_file}\""
)
endif()
list(APPEND CTEST_CONFIGURE_COMMAND_ARGS
"-C \"${package_enables_file}\""
"-G \"${CTEST_CMAKE_GENERATOR}\""
"${CTEST_SOURCE_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# ************************************************************************
Expand Down
12 changes: 9 additions & 3 deletions cmake/tribits/core/package_arch/TribitsPackageMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,19 @@ macro(tribits_disable_optional_dependency upstreamPackageName reasonStr)
" Instead, please call this from the package's base CMakeLists.txt file"
" '${${PACKAGE_NAME}_SOURCE_DIR}/CMakeLists.txt'" )
endif()
# Get the variable names that are going to be set assert they exist already
# Get the variable names that are going to be set
set(packageEnableVarName ${PACKAGE_NAME}_ENABLE_${upstreamPackageName})
assert_defined(${packageEnableVarName})
string(TOUPPER ${upstreamPackageName} upstreamPackageName_UC)
set(havePackageUpstreamPackageMacroVarName
HAVE_${PACKAGE_NAME_UC}_${upstreamPackageName_UC})
assert_defined(${havePackageUpstreamPackageMacroVarName})
# Assert that the vars already exist (to make sure the package and dependency exist)
if (${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES IN_LIST
${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES_ERROR_VALUES_LIST
)
# We only assert if all packages have to exist, which is not true in a reduced source tree
assert_defined(${packageEnableVarName})
assert_defined(${havePackageUpstreamPackageMacroVarName})
endif()
# Set the variables to OFF in local and project-level scopes
if (NOT "${reasonStr}" STREQUAL "")
message("-- ${reasonStr}")
Expand Down
25 changes: 4 additions & 21 deletions packages/amesos2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
TRIBITS_PACKAGE(Amesos2)

SET(${PACKAGE_NAME_UC}_VERSION "0.3d")
SET(${PACKAGE_NAME_UC}_RELEASE_DATE "07/28/2011")

#
# B) Set up package-specific options
Expand Down Expand Up @@ -68,36 +67,20 @@ TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_KLU2
ON
)

IF (Trilinos_ENABLE_ShyLU_NodeTacho AND NOT Kokkos_ENABLE_CUDA AND NOT Kokkos_ENABLE_HIP)
SET(Amesos2_HAVE_TACHO ON)
ELSE()
SET(Amesos2_HAVE_TACHO OFF)
IF (Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP)
tribits_disable_optional_dependency(ShyLU_NodeTacho "NOTE: Disabling ${PACKAGE_NAME}_ENABLE_ShyLU_NodeTacho because CUDA or HIP is enabled in Kokkos")
ENDIF()

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_ShyLU_NodeTacho
HAVE_AMESOS2_TACHO
"Enable Tacho in Amesos2"
${Amesos2_HAVE_TACHO}
)

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Basker
HAVE_AMESOS2_BASKER
"Enable Basker in Amesos2"
OFF
)

IF (Trilinos_ENABLE_ShyLU_NodeBasker AND Kokkos_ENABLE_OPENMP AND NOT Kokkos_ENABLE_CUDA AND NOT Kokkos_ENABLE_HIP)
SET(Amesos2_HAVE_SHYLUBASKER ON)
ELSE()
SET(Amesos2_HAVE_SHYLUBASKER OFF)
IF (NOT Kokkos_ENABLE_OPENMP OR Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP)
tribits_disable_optional_dependency(ShyLU_NodeBasker "NOTE: Disabling ${PACKAGE_NAME}_ENABLE_ShyLU_NodeBasker because CUDA or HIP is enabled in Kokkos or OpenMP is not enabled in Kokkos")
ENDIF()

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_ShyLU_NodeBasker
HAVE_AMESOS2_SHYLUBASKER
"Enable ShyLUBasker in Amesos2"
${Amesos2_HAVE_SHYLUBASKER}
)

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Experimental
HAVE_AMESOS2_EXPERIMENTAL
"Enable building and installation of experimental Amesos2 features."
Expand Down
6 changes: 2 additions & 4 deletions packages/amesos2/cmake/Amesos2_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@

#define AMESOS2_VERSION "${AMESOS2_VERSION}"

#define AMESOS2_RELEASE_DATE "${AMESOS2_RELEASE_DATE}"

/******************
* Config Options *
******************/
Expand Down Expand Up @@ -86,7 +84,7 @@
#cmakedefine HAVE_AMESOS2_UMFPACK

/* Defined if you want to enable amesos2-tacho */
#cmakedefine HAVE_AMESOS2_TACHO
#cmakedefine HAVE_AMESOS2_SHYLU_NODETACHO

/* Define if you want to build amesos2-superlu */
#cmakedefine HAVE_AMESOS2_SUPERLU
Expand Down Expand Up @@ -116,7 +114,7 @@
#cmakedefine HAVE_AMESOS2_BASKER

/*Define if you want to use ShyLUBasker */
#cmakedefine HAVE_AMESOS2_SHYLUBASKER
#cmakedefine HAVE_AMESOS2_SHYLU_NODEBASKER

/* Define to 1 if SuperLU_DIST uses a SLU_ prefix on a few of its enums */
#cmakedefine HAVE_SUPERLUDIST_ENUM_NAMESPACE
Expand Down
4 changes: 2 additions & 2 deletions packages/amesos2/example/SimpleSolveNonContigMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
int main(int argc, char *argv[]) {
Tpetra::ScopeGuard tpetraScope(&argc,&argv);

#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
std::string solver_name = "ShyLUBasker";
#else
std::string solver_name = "Basker";
Expand Down Expand Up @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) {

// Teuchos::ParameterList & sublist_params = amesos2_params.sublist(solver_name);
// sublist_params.set("IsContiguous", false, "Are GIDs Contiguous");
#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
if ( solver_name == "ShyLUBasker" ) {
amesos2_params.sublist(solver_name).set("num_threads", 1, "Number of threads");
// sublist_params.set("num_threads", 1, "Number of threads");
Expand Down
2 changes: 1 addition & 1 deletion packages/amesos2/example/quick_solve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
return 0;
}

#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
if( Amesos2::query("ShyLUBasker") ) {
Teuchos::ParameterList amesos2_params("Amesos2");
amesos2_params.sublist(solver_name).set("num_threads", 1, "Number of threads");
Expand Down
2 changes: 1 addition & 1 deletion packages/amesos2/example/quick_solve_epetra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) {
return 0;
}

#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
if( Amesos2::query("shylubasker") ) {
Teuchos::ParameterList amesos2_params("Amesos2");
amesos2_params.sublist(solver_name).set("num_threads", 1, "Number of threads");
Expand Down
2 changes: 1 addition & 1 deletion packages/amesos2/src/Amesos2_Cholmod_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Cholmod : public SolverCore<Amesos2::Cholmod, Matrix, Vector>
using DeviceMemSpaceType = typename Kokkos::CudaSpace;
#elif KOKKOS_ENABLE_HIP
// same as above, make the solver UVM off
using DeviceMemSpaceType = typename Kokkos::Experimental::HIPSpace;
using DeviceMemSpaceType = typename Kokkos::HIPSpace;
#else
using DeviceMemSpaceType = typename DeviceExecSpaceType::memory_space;
#endif
Expand Down
4 changes: 2 additions & 2 deletions packages/amesos2/src/Amesos2_Factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace Amesos2 {
}
#endif

#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
if (solverName == "amesos2_shylubasker" ||
//solverName == "ShyLUBasker" || // unnecessary - tolower called on solver name prior
solverName == "shylubasker") {
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace Amesos2 {
}
#endif

#ifdef HAVE_AMESOS2_TACHO
#ifdef HAVE_AMESOS2_SHYLU_NODETACHO
if (solverName == "amesos2_tacho" || solverName == "tacho") {
return true;
}
Expand Down
20 changes: 10 additions & 10 deletions packages/amesos2/src/Amesos2_Factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#include "Amesos2_Basker.hpp"
#endif

#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
#include "Amesos2_ShyLUBasker.hpp"
#endif

Expand All @@ -116,7 +116,7 @@
#include "Amesos2_Umfpack.hpp"
#endif

#ifdef HAVE_AMESOS2_TACHO // Tacho
#ifdef HAVE_AMESOS2_SHYLU_NODETACHO // Tacho
#include "Amesos2_Tacho.hpp"
#endif

Expand Down Expand Up @@ -358,10 +358,10 @@ namespace Amesos2 {
Teuchos::RCP<const Vector> B )
{
ctassert<
Meta::is_same<
std::is_same_v<
typename MatrixTraits<Matrix>::scalar_t,
typename MultiVecAdapter<Vector>::scalar_t
>::value
>
> same_scalar_assertion;
(void)same_scalar_assertion; // This stops the compiler from warning about unused declared variables

Expand Down Expand Up @@ -429,10 +429,10 @@ struct throw_no_matrix_support_exception {
Teuchos::RCP<Vector> X,
Teuchos::RCP<const Vector> B )
{
return Meta::if_then_else<
return std::conditional_t<
solver_supports_scalar<ConcreteSolver, typename MatrixTraits<Matrix>::scalar_t>::value,
create_solver_with_supported_type<ConcreteSolver,Matrix,Vector>,
throw_no_scalar_support_exception<ConcreteSolver,Matrix,Vector> >::type::apply(A, X, B);
throw_no_scalar_support_exception<ConcreteSolver,Matrix,Vector> >::apply(A, X, B);
}
};

Expand All @@ -453,10 +453,10 @@ struct throw_no_matrix_support_exception {
Teuchos::RCP<Vector> X,
Teuchos::RCP<const Vector> B )
{
return Meta::if_then_else<
return std::conditional_t<
solver_supports_matrix<ConcreteSolver, Matrix>::value,
handle_solver_scalar_type_support<ConcreteSolver,Matrix,Vector>,
throw_no_matrix_support_exception<ConcreteSolver,Matrix,Vector> >::type::apply(A, X, B);
throw_no_matrix_support_exception<ConcreteSolver,Matrix,Vector> >::apply(A, X, B);
}
};

Expand Down Expand Up @@ -576,7 +576,7 @@ struct throw_no_matrix_support_exception {
// Check for our native solver first. Treat KLU and KLU2 as equals.
//
// We use compiler guards in case a user does want to disable KLU2
#ifdef HAVE_AMESOS2_SHYLUBASKER
#ifdef HAVE_AMESOS2_SHYLU_NODEBASKER
if((solverName == "ShyLUBasker") || (solverName == "shylubasker") || (solverName == "amesos2_shylubasker"))
{
return handle_solver_matrix_and_type_support<ShyLUBasker, Matrix,Vector>::apply(A,X,B);
Expand Down Expand Up @@ -623,7 +623,7 @@ struct throw_no_matrix_support_exception {
}
#endif

#ifdef HAVE_AMESOS2_TACHO
#ifdef HAVE_AMESOS2_SHYLU_NODETACHO
if((solverName == "amesos2_tacho") ||
(solverName == "tacho")){
return handle_solver_matrix_and_type_support<TachoSolver,Matrix,Vector>::apply(A, X, B);
Expand Down
34 changes: 20 additions & 14 deletions packages/amesos2/src/Amesos2_KokkosCrsMatrix_MatrixAdapter_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ namespace Amesos2 {
Teuchos::RCP<const MatrixAdapter<KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace> > >
ConcreteMatrixAdapter<
KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace>
>::get_impl(const Teuchos::Ptr<const Tpetra::Map<local_ordinal_t,global_ordinal_t,node_t> > map, EDistribution distribution) const
{
>::get_impl(
[[maybe_unused]] const Teuchos::Ptr<const Tpetra::Map<local_ordinal_t,global_ordinal_t,node_t> > map,
[[maybe_unused]] EDistribution distribution
) const {
TEUCHOS_TEST_FOR_EXCEPTION( true,
std::runtime_error,
"get_impl() not implemented for the Kokkos CrsMatrix adapter yet. "
Expand Down Expand Up @@ -147,8 +149,10 @@ namespace Amesos2 {
template <typename Scalar, typename LocalOrdinal, typename ExecutionSpace>
size_t
ConcreteMatrixAdapter<
KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace>>::getGlobalRowNNZ_impl(global_ordinal_t row) const
{
KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace>
>::getGlobalRowNNZ_impl(
[[maybe_unused]] global_ordinal_t row
) const {
TEUCHOS_TEST_FOR_EXCEPTION( true,
std::runtime_error,
"getGlobalRowNNZ_impl() not implemented for the Kokkos CrsMatrix adapter yet. "
Expand Down Expand Up @@ -193,16 +197,18 @@ namespace Amesos2 {
template <typename KV_GO, typename KV_S>
void
ConcreteMatrixAdapter<
KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace>>::getGlobalRowCopy_kokkos_view_impl(global_ordinal_t row,
KV_GO & indices,
KV_S & vals,
size_t& nnz) const
{
TEUCHOS_TEST_FOR_EXCEPTION( true,
std::runtime_error,
"getGlobalRowCopy_kokkos_view_impl not implemented for Kokkos CrsMatrix yet. "
"Please contact the Amesos2 developers." );
}
KokkosSparse::CrsMatrix<Scalar,LocalOrdinal,ExecutionSpace>
>::getGlobalRowCopy_kokkos_view_impl(
[[maybe_unused]] global_ordinal_t row,
[[maybe_unused]] KV_GO & indices,
[[maybe_unused]] KV_S & vals,
[[maybe_unused]] size_t& nnz
) const {
TEUCHOS_TEST_FOR_EXCEPTION( true,
std::runtime_error,
"getGlobalRowCopy_kokkos_view_impl not implemented for Kokkos CrsMatrix yet. "
"Please contact the Amesos2 developers." );
}

} // end namespace Amesos2

Expand Down
Loading

0 comments on commit 418504c

Please sign in to comment.