Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,20 @@ jobs:
config:
- {name: "GCC",
buildType: "Debug",
disable_gmm: "ON", # TOOD: enable again if GMM was fixed
Developer: "ON",
cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON",
packages: "",
distro: "archlinux"
}
- {name: "Clang",
buildType: "Debug",
disable_gmm: "ON", # TOOD: enable again if GMM was fixed
Developer: "ON",
cmakeArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSTORM_WARNING_AS_ERROR=ON",
packages: "clang",
distro: "archlinux"
}
- { name: "musl",
buildType: "Debug",
disable_gmm: "ON", # TOOD: enable again if GMM was fixed
Developer: "ON",
cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON",
packages: "",
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ endif()

export_option(STORM_HAVE_CUDD)
export_option(STORM_HAVE_GMM)
export_option(STORM_HAVE_GMM_ILU)
export_option(STORM_HAVE_GLPK)
export_option(STORM_HAVE_GUROBI)
export_option(STORM_HAVE_MATHSAT)
Expand Down
6 changes: 6 additions & 0 deletions resources/3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ if(NOT STORM_DISABLE_GMM)
FILES_MATCHING PATTERN "*.h" PATTERN ".git" EXCLUDE)
list(APPEND STORM_DEP_TARGETS gmm)
set(STORM_HAVE_GMM ON)
set(STORM_HAVE_GMM_ILU ON)
if((STORM_COMPILER_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 21.0) OR (STORM_COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 15.0))
# GMM ILU preconditioner accesses out-of-bounds values and throws debug assertions in latest compiler versions
message(WARNING "Storm - Disabling Ilu preconditioner for Gmm due to current issues")
set(STORM_HAVE_GMM_ILU OFF)
endif()
else()
message(STATUS "Storm - Not linking with gmm.")
set(STORM_HAVE_GMM OFF)
Expand Down
1 change: 1 addition & 0 deletions src/storm-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
// Whether the libraries are available and to be used
#cmakedefine STORM_HAVE_CUDD
#cmakedefine STORM_HAVE_GMM
#cmakedefine STORM_HAVE_GMM_ILU // Disable ilu preconditioner due to current issues
#cmakedefine STORM_HAVE_GLPK
#cmakedefine STORM_HAVE_GUROBI
#cmakedefine STORM_HAVE_MATHSAT
Expand Down
21 changes: 21 additions & 0 deletions src/storm/solver/GmmxxLinearEquationSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ bool GmmxxLinearEquationSolver<ValueType>::internalSolveEquations(Environment co
method == GmmxxLinearEquationSolverMethod::Gmres) {
// Make sure that the requested preconditioner is available
if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Ilu && !iluPreconditioner) {
#ifdef STORM_HAVE_GMM_ILU
iluPreconditioner = std::make_unique<gmm::ilu_precond<gmm::csr_matrix<ValueType>>>(*gmmxxA);
#else
diagonalPreconditioner = std::make_unique<gmm::diagonal_precond<gmm::csr_matrix<ValueType>>>(*gmmxxA);
#endif
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Diagonal) {
diagonalPreconditioner = std::make_unique<gmm::diagonal_precond<gmm::csr_matrix<ValueType>>>(*gmmxxA);
}
Expand All @@ -91,23 +95,38 @@ bool GmmxxLinearEquationSolver<ValueType>::internalSolveEquations(Environment co
// Invoke gmm with the corresponding settings
if (method == GmmxxLinearEquationSolverMethod::Bicgstab) {
if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Ilu) {
#ifdef STORM_HAVE_GMM_ILU
gmm::bicgstab(*gmmxxA, x, b, *iluPreconditioner, iter);
#else
STORM_LOG_WARN("Preconditioner Ilu not available, using diagonal preconditioner instead.");
gmm::bicgstab(*gmmxxA, x, b, *diagonalPreconditioner, iter);
#endif
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Diagonal) {
gmm::bicgstab(*gmmxxA, x, b, *diagonalPreconditioner, iter);
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::None) {
gmm::bicgstab(*gmmxxA, x, b, gmm::identity_matrix(), iter);
}
} else if (method == GmmxxLinearEquationSolverMethod::Qmr) {
if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Ilu) {
#ifdef STORM_HAVE_GMM_ILU
gmm::qmr(*gmmxxA, x, b, *iluPreconditioner, iter);
#else
STORM_LOG_WARN("Preconditioner Ilu not available, using diagonal preconditioner instead.");
gmm::qmr(*gmmxxA, x, b, *diagonalPreconditioner, iter);
#endif
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Diagonal) {
gmm::qmr(*gmmxxA, x, b, *diagonalPreconditioner, iter);
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::None) {
gmm::qmr(*gmmxxA, x, b, gmm::identity_matrix(), iter);
}
} else if (method == GmmxxLinearEquationSolverMethod::Gmres) {
if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Ilu) {
#ifdef STORM_HAVE_GMM_ILU
gmm::gmres(*gmmxxA, x, b, *iluPreconditioner, env.solver().gmmxx().getRestartThreshold(), iter);
#else
STORM_LOG_WARN("Preconditioner Ilu not available, using diagonal preconditioner instead.");
gmm::gmres(*gmmxxA, x, b, *diagonalPreconditioner, env.solver().gmmxx().getRestartThreshold(), iter);
#endif
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::Diagonal) {
gmm::gmres(*gmmxxA, x, b, *diagonalPreconditioner, env.solver().gmmxx().getRestartThreshold(), iter);
} else if (preconditioner == GmmxxLinearEquationSolverPreconditioner::None) {
Expand Down Expand Up @@ -151,7 +170,9 @@ LinearEquationSolverProblemFormat GmmxxLinearEquationSolver<ValueType>::getEquat
template<typename ValueType>
void GmmxxLinearEquationSolver<ValueType>::clearCache() const {
#ifdef STORM_HAVE_GMM
#ifdef STORM_HAVE_GMM_ILU
iluPreconditioner.reset();
#endif
diagonalPreconditioner.reset();
LinearEquationSolver<ValueType>::clearCache();
#else
Expand Down
Loading