Skip to content

Commit

Permalink
Add missing openmp library. Adjust tolerance of failing test.
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
  • Loading branch information
quantumsteve authored and bmcdanie committed Feb 12, 2021
1 parent db3e188 commit d43b3bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ if(ASGARD_USE_MKL)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --compiler-options -fopenmp")
else()
target_compile_options (kronmult_cuda PRIVATE "-fopenmp") # CMAKE doesn't handle MKL openmp link properly
if(APPLE) # Need to link against the same openmp library as the MKL.
foreach (_lib IN LISTS LINALG_LIBS)
if (_lib MATCHES "libiomp5")
target_link_libraries(kronmult_cuda PRIVATE ${_lib})
break()
endif()
endforeach()
endif()
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/kronmult_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ TEMPLATE_TEST_CASE("test kronmult", "[kronmult]", float, double)
TEMPLATE_TEST_CASE("test kronmult w/ decompose", "[kronmult]", float, double)
{
TestType const tol_factor =
std::is_same<TestType, double>::value ? 1e-15 : 1e-7;
std::is_same<TestType, double>::value ? 1e-15 : 1.1e-7;

SECTION("2d - uniform level")
{
Expand Down

0 comments on commit d43b3bd

Please sign in to comment.