Skip to content

Commit

Permalink
Amesos2 : cleanup for matrix-gather
Browse files Browse the repository at this point in the history
Signed-off-by: iyamazaki <[email protected]>
  • Loading branch information
iyamazaki committed Jan 20, 2025
1 parent d232fba commit 532e81c
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 14 deletions.
4 changes: 0 additions & 4 deletions packages/amesos2/src/Amesos2_ConcreteMatrixAdapter_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@

#include "Amesos2_TpetraCrsMatrix_MatrixAdapter_def.hpp"
#include "Amesos2_KokkosCrsMatrix_MatrixAdapter_def.hpp"
#ifdef HAVE_AMESOS2_EPETRA
// NOTE: this causes re-defitions
//# include "Amesos2_EpetraCrsMatrix_MatrixAdapter_def.hpp"
#endif

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
// *****************************************************************************
// @HEADER

#include "Amesos2_EpetraCrsMatrix_MatrixAdapter.hpp"

#ifdef HAVE_AMESOS2_EXPLICIT_INSTANTIATION
#include "Amesos2_EpetraCrsMatrix_MatrixAdapter_def.hpp"
#endif // HAVE_AMESOS2_EXPLICIT_INSTANTIATION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@
#define AMESOS2_EPETRACRSMATRIX_MATRIXADAPTER_HPP

#include "Amesos2_EpetraCrsMatrix_MatrixAdapter_decl.hpp"
#ifndef HAVE_AMESOS2_EXPLICIT_INSTANTIATION
# include "Amesos2_EpetraCrsMatrix_MatrixAdapter_def.hpp"
#endif

#endif // AMESOS2_EPETRACRSMATRIX_MATRIXADAPTER_HPP
1 change: 0 additions & 1 deletion packages/amesos2/src/Amesos2_KLU2_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class KLU2 : public SolverCore<Amesos2::KLU2, Matrix, Vector>
typedef typename super_type::local_ordinal_type local_ordinal_type;
typedef typename super_type::global_ordinal_type global_ordinal_type;
typedef typename super_type::global_size_type global_size_type;
typedef typename super_type::node_type node_type;

typedef TypeMap<Amesos2::KLU2,scalar_type> type_map;

Expand Down
5 changes: 3 additions & 2 deletions packages/amesos2/src/Amesos2_KLU2_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,9 @@ KLU2<Matrix,Vector>::loadA_impl(EPhase current_phase)
nnz_ret = this->matrixA_->gather(host_nzvals_view_, host_rows_view_, host_col_ptr_view_, this->recvCounts, this->recvDispls, this->transpose_map, this->nzvals_t,
column_major, current_phase);
}
// gather failed (e.g., not implemened for KokkosCrsMatrix)
if (nnz_ret < 0) gather_supported = false;
// gather failed (e.g., not implemened for KokkosCrsMatrix)
// in case of the failure, it falls back to the original "do_get"
if (nnz_ret < 0) gather_supported = false;
}
if (!gather_supported) {
Util::get_ccs_helper_kokkos_view<
Expand Down
1 change: 1 addition & 0 deletions packages/amesos2/src/Amesos2_ShyLUBasker_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ ShyLUBasker<Matrix,Vector>::loadA_impl(EPhase current_phase)
column_major, current_phase);
}
// gather failed (e.g., not implemened for KokkosCrsMatrix)
// in case of the failure, it falls back to the original "do_get"
if (nnz_ret < 0) gather_supported = false;
}
if (!gather_supported) {
Expand Down

0 comments on commit 532e81c

Please sign in to comment.