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

Fix ArborX tests for Trilinos 14/Kokkos 4 #15391

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/base/kokkos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ namespace internal
void
ensure_kokkos_initialized()
{
if (!Kokkos::is_initialized())
if (!Kokkos::is_initialized()
#if KOKKOS_VERSION >= 30700
&& !Kokkos::is_finalized()
#endif
)
{
// only execute once
static bool dummy = [] {
Expand Down
4 changes: 0 additions & 4 deletions tests/arborx/distributed_tree_intersect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,11 @@ test_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);
Utilities::MPI::MPI_InitFinalize mpi_init(argc, argv);

initlog();

// tests
test_2d();
test_3d();

Kokkos::finalize();
}
4 changes: 0 additions & 4 deletions tests/arborx/distributed_tree_nearest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ test_point_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);
Utilities::MPI::MPI_InitFinalize mpi_init(argc, argv);

initlog();
Expand All @@ -334,6 +332,4 @@ main(int argc, char **argv)
test_bounding_box_3d();
test_point_2d();
test_point_3d();

Kokkos::finalize();
}
5 changes: 0 additions & 5 deletions tests/arborx/point_intersect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ test_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);

initlog();

// Initialize ArborX
Expand All @@ -181,6 +178,4 @@ main(int argc, char **argv)
// tests
test_2d();
test_3d();

Kokkos::finalize();
}
5 changes: 0 additions & 5 deletions tests/arborx/point_nearest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ test_points_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);

initlog();

// Initialize ArborX
Expand All @@ -296,6 +293,4 @@ main(int argc, char **argv)
test_bounding_box_3d();
test_points_2d();
test_points_3d();

Kokkos::finalize();
}
5 changes: 0 additions & 5 deletions tests/arborx/sphere_intersect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ test_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);

initlog();

// Initialize ArborX
Expand All @@ -155,6 +152,4 @@ main(int argc, char **argv)
// tests
test_2d();
test_3d();

Kokkos::finalize();
}
5 changes: 0 additions & 5 deletions tests/arborx/sphere_nearest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ test_3d()
int
main(int argc, char **argv)
{
// Initialize Kokkos
Kokkos::initialize(argc, argv);

initlog();

// Initialize ArborX
Expand All @@ -154,6 +151,4 @@ main(int argc, char **argv)
// tests
test_2d();
test_3d();

Kokkos::finalize();
}