mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-24 16:30:02 -06:00
Merge pull request #4637 from akva2/gpu_tests_add_labels
GPU tests: add a label and make missing device a failure
This commit is contained in:
commit
0196259537
@ -540,19 +540,24 @@ add_custom_target(extra_test ${CMAKE_CTEST_COMMAND} -C ExtraTests)
|
||||
if(CUDA_FOUND)
|
||||
target_link_libraries( opmsimulators PUBLIC ${CUDA_cusparse_LIBRARY} )
|
||||
target_link_libraries( opmsimulators PUBLIC ${CUDA_cublas_LIBRARY} )
|
||||
set_tests_properties(cusparseSolver PROPERTIES LABELS gpu_cuda)
|
||||
endif()
|
||||
|
||||
if(OpenCL_FOUND)
|
||||
target_link_libraries( opmsimulators PUBLIC ${OpenCL_LIBRARIES} )
|
||||
set_tests_properties(openclSolver solvetransposed3x3 csrToCscOffsetMap
|
||||
PROPERTIES LABELS gpu_opencl)
|
||||
endif()
|
||||
|
||||
if(ROCALUTION_FOUND)
|
||||
target_include_directories(opmsimulators PUBLIC ${rocalution_INCLUDE_DIR}/rocalution)
|
||||
set_tests_properties(rocalutionSolver PROPERTIES LABELS gpu_rocm)
|
||||
endif()
|
||||
|
||||
if(rocsparse_FOUND AND rocblas_FOUND)
|
||||
target_link_libraries( opmsimulators PUBLIC roc::rocsparse )
|
||||
target_link_libraries( opmsimulators PUBLIC roc::rocblas )
|
||||
set_tests_properties(rocsparseSolver PROPERTIES LABELS gpu_rocm)
|
||||
endif()
|
||||
|
||||
if(VexCL_FOUND)
|
||||
|
@ -198,6 +198,6 @@ BOOST_AUTO_TEST_CASE(TestCusparseSolver)
|
||||
// Test with 3x3 block solvers.
|
||||
test3(prm);
|
||||
} catch(const DeviceInitException& ) {
|
||||
BOOST_WARN_MESSAGE(true, "Problem with initializing a device. skipping test");
|
||||
BOOST_ERROR("Problem with initializing a device.");
|
||||
}
|
||||
}
|
||||
|
@ -195,6 +195,6 @@ BOOST_AUTO_TEST_CASE(TestOpenclSolver)
|
||||
// Test with 3x3 block solvers.
|
||||
test3(prm);
|
||||
} catch(const PlatformInitException& ) {
|
||||
BOOST_WARN_MESSAGE(true, "Problem with initializing Platform. skipping test");
|
||||
BOOST_ERROR("Problem with initializing Platform.");
|
||||
}
|
||||
}
|
||||
|
@ -156,6 +156,6 @@ BOOST_AUTO_TEST_CASE(TestRocalutionSolver)
|
||||
// test rocalution with 3x3 blocks
|
||||
test3(prm);
|
||||
} else {
|
||||
BOOST_WARN_MESSAGE(true, "Problem with initializing a device. skipping test");
|
||||
BOOST_ERROR("Problem with initializing a device.");
|
||||
}
|
||||
}
|
||||
|
@ -212,6 +212,6 @@ BOOST_AUTO_TEST_CASE(TestRocsparseSolver)
|
||||
// Test with 3x3 block solvers.
|
||||
test3(prm);
|
||||
} catch(const HIPInitException& ) {
|
||||
BOOST_WARN_MESSAGE(true, "Problem with initializing HIP, skipping test");
|
||||
BOOST_ERROR("Problem with initializing HIP.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user