Commit 33e3b9a5 authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

x86 fast math breaks tests. Power9 doesn't have this issue

parent 576f34b4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -45,8 +45,9 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.2)
endif()

# Set extra optimization specific flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
# These break tests intel x86_64
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")

if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
  # the case for x86_64
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ if (DCA_HAVE_CUDA)
  if (CUDA_VERSION VERSION_GREATER "11.0.0")
    list(APPEND CMAKE_CUDA_FLAGS
      -arch=${CUDA_GPU_ARCH}
      -std=c++14
      -std=c++17
      -Xcompiler -Wall
      -Xcompiler -Wextra
      -Xcompiler -Wno-unused-parameter
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ dca_add_gtest(matrixop_real_gpu_test
              GTEST_MAIN
              CUDA
              LIBS ${DCA_LIBS} lapack gpu_utils magma::magma lapack_kernels blas_kernels)

# lapack_kernels blas_kernels  lapack_kernels
dca_add_gtest(matrixop_complex_gpu_test
              GTEST_MAIN
+1 −1
Original line number Diff line number Diff line
@@ -591,7 +591,7 @@ TYPED_TEST(MatrixopComplexGPUTest, ScaleRow) {

    for (int j = 0; j < a.nrCols(); ++j) {
      for (int i = 0; i < is.size(); ++i) {
        EXPECT_GE(10 * this->epsilon, std::abs(vals[i] * a(is[i], j) - c(is[i], j)));
        EXPECT_GE(10 * this->epsilon, std::abs(vals[i] * a(is[i], j) - c(is[i], j))) << " i:" << i << " j:" << j; 
        // set the checked elements to -1000 to simplify the check of the unchanged elements
        c(is[i], j) = checked;
      }