Skip to content

Commit

Permalink
Merge pull request #13102 from iyamazaki/amesos-css
Browse files Browse the repository at this point in the history
Amesos : add MKL Cluster Sparse Solver interface
  • Loading branch information
iyamazaki authored Jul 1, 2024
2 parents bd7c4f7 + 462eb6f commit a21f061
Show file tree
Hide file tree
Showing 10 changed files with 1,239 additions and 425 deletions.
9 changes: 9 additions & 0 deletions packages/amesos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ IF(NOT TPL_ENABLE_MPI)
ENDIF()
ENDIF()

# if using CSC, must be parallel and needs Pardiso_MKL
IF (${PACKAGE_NAME}_ENABLE_CSS_MKL)
IF (NOT TPL_ENABLE_MPI)
MESSAGE(WARNING "*****Amesos_ENABLE_CSS_MKL requires MPI. Turning off CSS_MKL. *****")
SET(AMESOS_ENABLE_CSS_MKL OFF)
SET(HAVE_AMESOS_CSS_MKL OFF)
ENDIF()
ENDIF()

# if using parallel MUMPS, must also link in scalapack and BLACS

IF(${PACKAGE_NAME}_ENABLE_MUMPS AND ${PACKAGE_NAME}_ENABLE_MPI AND NOT ${PACKAGE_NAME}_ENABLE_SCALAPACK)
Expand Down
3 changes: 3 additions & 0 deletions packages/amesos/cmake/Amesos_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
/* Using pre July 2005 Superlu */
#cmakedefine AMESOS_SUPERLU_PRE_JULY2005

/* Define if want to build amesos-cssmkl */
#cmakedefine HAVE_AMESOS_CSS_MKL

/* Define if want to build amesos-dscpack */
#cmakedefine HAVE_AMESOS_DSCPACK

Expand Down
2 changes: 1 addition & 1 deletion packages/amesos/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ SET(LIB_OPTIONAL_DEP_PACKAGES EpetraExt)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES Triutils Galeri)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS SuperLUDist ParMETIS UMFPACK SuperLU BLACS SCALAPACK MUMPS TAUCS PARDISO_MKL PARDISO CSparse)
SET(LIB_OPTIONAL_DEP_TPLS SuperLUDist ParMETIS UMFPACK SuperLU BLACS SCALAPACK MUMPS TAUCS CSS_MKL PARDISO_MKL PARDISO CSparse)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)
12 changes: 12 additions & 0 deletions packages/amesos/src/Amesos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
#ifdef HAVE_AMESOS_TAUCS
#include "Amesos_Taucs.h"
#endif
#ifdef HAVE_AMESOS_CSS_MKL
#include "Amesos_CssMKL.h"
#endif
#ifdef HAVE_AMESOS_PARAKLETE
#include "Amesos_Paraklete.h"
#endif
Expand Down Expand Up @@ -158,6 +161,15 @@ Amesos_BaseSolver* Amesos::Create(const std::string CT,
#endif
}

if (CT == "Amesos_CssMKL") {
#ifdef HAVE_AMESOS_CSS_MKL
return new Amesos_CssMKL(LinearProblem);
#else
if (verbose) std::cerr << "Amesos_CssMKL is not implemented" << std::endl ;
return(0);
#endif
}

if ((CT == "Amesos_Paraklete") || (CT == "Paraklete")) {
#ifdef HAVE_AMESOS_PARAKLETE
return new Amesos_Paraklete(LinearProblem);
Expand Down
Loading

0 comments on commit a21f061

Please sign in to comment.