Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODE: BDF methods #1930

Merged
merged 22 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
394f88a
ODE: adding BDF algorithms
lucbv Aug 1, 2023
2dd8c2a
ODE: fixing storage handling for start-up RK stack
lucbv Aug 14, 2023
8df3df9
ODE: clang-format
lucbv Aug 14, 2023
e8d5b42
ODE: first adaptive version of BDF
lucbv Aug 16, 2023
10a9149
ODE: fixing issues with adaptive BDF
lucbv Oct 3, 2023
6e87fb0
ODE: running BDF on StiffChemistry problem
lucbv Oct 5, 2023
204db13
BDF: fixing types and template parameters in batched calls
lucbv Oct 25, 2023
25a8617
More fixes for GPUs only in tests this time.
lucbv Nov 9, 2023
3ef4898
ODE: BDF adaptive, fix small bug
lucbv Nov 14, 2023
d5cd1df
Revert "More fixes for GPUs only in tests this time."
lucbv Nov 14, 2023
7c21791
Revert "Revert "More fixes for GPUs only in tests this time.""
lucbv Nov 14, 2023
5898ef6
ODE: BDF small change to temporarily avoid compile time issue
lucbv Nov 14, 2023
782d498
ODE: BDF fix for some printf statements that will go away soon...
lucbv Nov 14, 2023
ac1c879
ODE: adding benchmark for BDF
lucbv Nov 30, 2023
9c796f2
ODE: improve benchmark interface...
lucbv Nov 30, 2023
961f5f4
ODE: BDF changes to use RMS norm and change some default values
lucbv Dec 8, 2023
571405e
ODE: BDF convergence more stable and results look pretty good now!
lucbv Dec 8, 2023
6d30727
ODE: BDF fix bug in initial time step calculation
lucbv Dec 9, 2023
cbec42e
ODE: BDF removing bad print statement...
lucbv Dec 9, 2023
beefcaa
ODE - BDF: improving perf test
lucbv Jan 10, 2024
92a7f3c
Modifying unit-test to catch proper return type
lucbv Mar 7, 2024
228c55c
Applying clang-format
lucbv Mar 7, 2024
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
36 changes: 22 additions & 14 deletions batched/dense/impl/KokkosBatched_Gesv_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,20 +366,24 @@ KOKKOS_INLINE_FUNCTION void TeamVectorHadamard1D(const MemberType &member,
/// ===========
template <>
struct SerialGesv<Gesv::StaticPivoting> {
template <typename MatrixType, typename VectorType>
template <typename MatrixType, typename XVectorType, typename YVectorType>
KOKKOS_INLINE_FUNCTION static int invoke(const MatrixType A,
const VectorType X,
const VectorType Y,
const XVectorType X,
const YVectorType Y,
const MatrixType tmp) {
#if (KOKKOSKERNELS_DEBUG_LEVEL > 0)
static_assert(Kokkos::is_view<MatrixType>::value,
"KokkosBatched::gesv: MatrixType is not a Kokkos::View.");
static_assert(Kokkos::is_view<VectorType>::value,
"KokkosBatched::gesv: VectorType is not a Kokkos::View.");
static_assert(Kokkos::is_view<XVectorType>::value,
"KokkosBatched::gesv: XVectorType is not a Kokkos::View.");
static_assert(Kokkos::is_view<YVectorType>::value,
"KokkosBatched::gesv: YVectorType is not a Kokkos::View.");
static_assert(MatrixType::rank == 2,
"KokkosBatched::gesv: MatrixType must have rank 2.");
static_assert(VectorType::rank == 1,
"KokkosBatched::gesv: VectorType must have rank 1.");
static_assert(XVectorType::rank == 1,
"KokkosBatched::gesv: XVectorType must have rank 1.");
static_assert(YVectorType::rank == 1,
"KokkosBatched::gesv: YVectorType must have rank 1.");

// Check compatibility of dimensions at run time.

Expand Down Expand Up @@ -462,20 +466,24 @@ struct SerialGesv<Gesv::StaticPivoting> {

template <>
struct SerialGesv<Gesv::NoPivoting> {
template <typename MatrixType, typename VectorType>
template <typename MatrixType, typename XVectorType, typename YVectorType>
KOKKOS_INLINE_FUNCTION static int invoke(const MatrixType A,
const VectorType X,
const VectorType Y,
const XVectorType X,
const YVectorType Y,
const MatrixType /*tmp*/) {
#if (KOKKOSKERNELS_DEBUG_LEVEL > 0)
static_assert(Kokkos::is_view<MatrixType>::value,
"KokkosBatched::gesv: MatrixType is not a Kokkos::View.");
static_assert(Kokkos::is_view<VectorType>::value,
"KokkosBatched::gesv: VectorType is not a Kokkos::View.");
static_assert(Kokkos::is_view<XVectorType>::value,
"KokkosBatched::gesv: XVectorType is not a Kokkos::View.");
static_assert(Kokkos::is_view<YVectorType>::value,
"KokkosBatched::gesv: YVectorType is not a Kokkos::View.");
static_assert(MatrixType::rank == 2,
"KokkosBatched::gesv: MatrixType must have rank 2.");
static_assert(VectorType::rank == 1,
"KokkosBatched::gesv: VectorType must have rank 1.");
static_assert(XVectorType::rank == 1,
"KokkosBatched::gesv: XVectorType must have rank 1.");
static_assert(YVectorType::rank == 1,
"KokkosBatched::gesv: YVectorType must have rank 1.");

// Check compatibility of dimensions at run time.

Expand Down
13 changes: 10 additions & 3 deletions batched/dense/src/KokkosBatched_Gesv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,18 @@ struct Gesv {

template <typename ArgAlgo>
struct SerialGesv {
template <typename MatrixType, typename VectorType>
template <typename MatrixType, typename XVectorType, typename YVectorType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the TeamGesv and TeamVectorGesv versions would have the same interface, but that can happen later

KOKKOS_INLINE_FUNCTION static int invoke(const MatrixType A,
const VectorType X,
const VectorType Y,
const XVectorType X,
const YVectorType Y,
const MatrixType tmp);

template <typename MatrixType, typename VectorType>
[[deprecated]] KOKKOS_INLINE_FUNCTION static int invoke(
const MatrixType A, const VectorType X, const VectorType Y,
const MatrixType tmp) {
return invoke(A, X, Y, tmp);
}
};

/// \brief Team Batched GESV:
Expand Down
Loading