Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for ENABLE_TPETRA=OFF and ENABLE_STRATIMIKOS=OFF
Browse files Browse the repository at this point in the history
wortiz committed Apr 4, 2024
1 parent 6ed4616 commit cdc48bb
Showing 2 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions include/sl_stratimikos_interface.h
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ int stratimikos_solve_tpetra(struct GomaLinearSolverData *ams,
int *iterations,
char stratimikos_file[MAX_NUM_MATRICES][MAX_CHAR_IN_INPUT],
int imtrx);

int stratimikos_solve(struct GomaLinearSolverData *ams,
double *x_,
double *b_,
25 changes: 19 additions & 6 deletions src/sl_stratimikos_interface.cpp
Original file line number Diff line number Diff line change
@@ -135,8 +135,8 @@ static void stratimikos_solve_setup(RCP<const Thyra::LinearOpBase<double>> A,
}
}

#ifdef GOMA_ENABLE_TPETRA
extern "C" {
#ifdef GOMA_ENABLE_TPETRA
int stratimikos_solve_tpetra(struct GomaLinearSolverData *ams,
double *x_,
double *b_,
@@ -232,6 +232,16 @@ int stratimikos_solve_tpetra(struct GomaLinearSolverData *ams,
return -1;
}
}
#else /* GOMA_ENABLE_TPETRA */
int stratimikos_solve_tpetra(struct GomaLinearSolverData *ams,
double *x_,
double *b_,
int *iterations,
char stratimikos_file[MAX_NUM_MATRICES][MAX_CHAR_IN_INPUT],
int imtrx) {
GOMA_EH(GOMA_ERROR, "Not built with Tpetra Stratimikos support!");
return -1;
}
#endif /* GOMA_ENABLE_TPETRA */

int stratimikos_solve(struct GomaLinearSolverData *ams,
@@ -318,14 +328,16 @@ int stratimikos_solve(struct GomaLinearSolverData *ams,

#include "mpi.h"

#include "sl_stratimikos_interface.h"
extern "C" {
#include "mm_eh.h"
#include "std.h"
int stratimikos_solve_tpetra(struct GomaLinearSolverData *ams,
double *x_,
double *b_,
int *iterations,
char *stratimikos_file) {
double *x_,
double *b_,
int *iterations,
char stratimikos_file[MAX_NUM_MATRICES][MAX_CHAR_IN_INPUT],
int imtrx) {
GOMA_EH(GOMA_ERROR, "Not built with stratimikos support!");
return -1;
}
@@ -334,7 +346,8 @@ int stratimikos_solve(struct GomaLinearSolverData *ams,
double *x_,
double *b_,
int *iterations,
char *stratimikos_file) {
char stratimikos_file[MAX_NUM_MATRICES][MAX_CHAR_IN_INPUT],
int imtrx) {
GOMA_EH(GOMA_ERROR, "Not built with stratimikos support!");
return -1;
}

0 comments on commit cdc48bb

Please sign in to comment.