Skip to content

Commit

Permalink
cuda test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
montythind committed Oct 3, 2024
1 parent d67add6 commit ecb857a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
16 changes: 0 additions & 16 deletions test/unit/cuda/solver/test_cuda_solver_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,4 @@ TEST(SolverBuilder, CanBuildCudaSolvers)
.SetReactions(reactions)
.SetNumberOfGridCells(L)
.Build();
}

TEST(SolverBuilder, MismatchedToleranceSizeIsCaught)
{
auto params = micm::RosenbrockSolverParameters::ThreeStageRosenbrockParameters();
// too many
params.absolute_tolerance_ = { 1e-6, 1e-6, 1e-6, 1e-6, 1e-6 };

constexpr std::size_t L = 4;
using cuda_builder = micm::CudaSolverBuilder<micm::CudaRosenbrockSolverParameters, L>;

EXPECT_ANY_THROW(cuda_builder(params).SetSystem(the_system).SetReactions(reactions).SetNumberOfGridCells(L).Build(););

// too few
params.absolute_tolerance_ = { 1e-6, 1e-6 };
EXPECT_ANY_THROW(cuda_builder(params).SetSystem(the_system).SetReactions(reactions).SetNumberOfGridCells(L).Build(););
}
16 changes: 0 additions & 16 deletions test/unit/jit/solver/test_jit_solver_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,4 @@ TEST(SolverBuilder, CanBuildJitRosenbrock)
.SetReactions(reactions)
.SetNumberOfGridCells(L)
.Build();
}

TEST(SolverBuilder, MismatchedToleranceSizeIsCaught)
{
auto params = micm::RosenbrockSolverParameters::ThreeStageRosenbrockParameters();
// too many
params.absolute_tolerance_ = { 1e-6, 1e-6, 1e-6, 1e-6, 1e-6 };

constexpr std::size_t L = 4;
using jit_builder = micm::JitSolverBuilder<micm::JitRosenbrockSolverParameters, L>;

EXPECT_ANY_THROW(jit_builder(params).SetSystem(the_system).SetReactions(reactions).SetNumberOfGridCells(L).Build(););

// too few
params.absolute_tolerance_ = { 1e-6, 1e-6 };
EXPECT_ANY_THROW(jit_builder(params).SetSystem(the_system).SetReactions(reactions).SetNumberOfGridCells(L).Build(););
}

0 comments on commit ecb857a

Please sign in to comment.