mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
fix cmake and cuda bugs
This commit is contained in:
parent
c288f7f0fb
commit
9bdc361368
@ -455,11 +455,11 @@ if (HAVE_CUDA)
|
||||
if(NOT CONVERT_CUDA_TO_HIP)
|
||||
set(CU_FILES_NEEDING_RELAXED_CONSTEXPR
|
||||
tests/gpuistl/test_gpu_ad.cu
|
||||
tests/gpuistl/gpu_linear_two_phase_material.cu
|
||||
tests/gpuistl/test_gpu_linear_two_phase_material.cu
|
||||
)
|
||||
|
||||
foreach(file ${LIST_OF_FILES})
|
||||
set_source_file_properties(${file} "--expt-relaxed-constexpr")
|
||||
foreach(file ${CU_FILES_NEEDING_RELAXED_CONSTEXPR})
|
||||
set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "--expt-relaxed-constexpr")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -95,7 +95,7 @@ BOOST_AUTO_TEST_CASE(TestSimpleInterpolation)
|
||||
OPM_GPU_SAFE_CALL(cudaMemcpy(gpuAdInput, &cpuMadeAd, sizeof(NorneEvaluation), cudaMemcpyHostToDevice));
|
||||
gpuTwoPhaseSatPcnwWrapper<<<1,1>>>(gpuViewParams, *gpuAdInput, gpuAdResOnGPU);
|
||||
OPM_GPU_SAFE_CALL(cudaDeviceSynchronize());
|
||||
OPM_GPU_SAFE_CALL(cudaMemcpy(gpuAdResOnCPU, gpuAdResOnGPU, sizeof(NorneEvaluation), cudaMemcpyDeviceToHost));
|
||||
OPM_GPU_SAFE_CALL(cudaMemcpy(&gpuAdResOnCPU, gpuAdResOnGPU, sizeof(NorneEvaluation), cudaMemcpyDeviceToHost));
|
||||
|
||||
BOOST_CHECK(gpuAdResOnCPU == cpuInterpolatedEval);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user