Skip to content

Commit

Permalink
Zoltan2 Sphynx: Fix template args
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcgcg committed Jun 8, 2023
1 parent 017894e commit eca01ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/zoltan2/sphynx/src/Zoltan2_Sphynx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ namespace Zoltan2 {
Teuchos::RCP<lproblem_t> innerPolyProblem(new lproblem_t());
innerPolyProblem->setOperator(laplacian_);

using btop_t = Belos::TpetraOperator<scalar_t>;
using btop_t = Belos::TpetraOperator<scalar_t, lno_t, gno_t, node_t>;
Teuchos::RCP<btop_t> polySolver(new btop_t(innerPolyProblem,
Teuchos::rcpFromRef(paramList),
"GmresPoly", true));
Expand Down
17 changes: 8 additions & 9 deletions packages/zoltan2/test/sphynx/Sphynx_Research_Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,14 @@ int main(int narg, char *arg[])
std::cout << "init = " << init << std::endl;
}

using scalar_type = double;
using local_ordinal_type = int;
using global_ordinal_type = long long;
using scalar_type = Tpetra::Details::DefaultTypes::scalar_type;
using local_ordinal_type = Tpetra::Details::DefaultTypes::local_ordinal_type;
using global_ordinal_type = Tpetra::Details::DefaultTypes::global_ordinal_type;
using node_type = Tpetra::Details::DefaultTypes::node_type;

using crs_matrix_type = Tpetra::CrsMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type>;
using map_type = Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type>;
using mv_type = Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>;
using adapter_type = Zoltan2::XpetraCrsGraphAdapter<typename crs_matrix_type::crs_graph_type>;
using solution_type = Zoltan2::PartitioningSolution<adapter_type>;

Expand Down Expand Up @@ -457,14 +459,11 @@ int main(int narg, char *arg[])
std::cout << "Done with reading/creating the matrix." << std::endl;
}

Teuchos::RCP<const Tpetra::Map<> > map = tmatrix->getMap();
Teuchos::RCP<const map_type> map = tmatrix->getMap();

using ST = double;
using MultiVector = Tpetra::MultiVector<ST>;

Teuchos::RCP<MultiVector > V;
Teuchos::RCP<mv_type> V;
if (vector_file !=""){
V = Tpetra::MatrixMarket::Reader<MultiVector >::readDenseFile(vector_file,pComm,map);
V = Tpetra::MatrixMarket::Reader<mv_type >::readDenseFile(vector_file,pComm,map);
if(me == 0){
std::cout << "Done with reading user-provided eigenvectors." << std::endl;
}
Expand Down

0 comments on commit eca01ff

Please sign in to comment.