From cbc41973fde6137bc42c34de64a41b5a82b597c0 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 30 Jul 2021 14:20:12 +0200 Subject: [PATCH 1/4] Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 --- ctest/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ctest/CMakeLists.txt b/ctest/CMakeLists.txt index 17f29fe69..f785d3f90 100644 --- a/ctest/CMakeLists.txt +++ b/ctest/CMakeLists.txt @@ -4,6 +4,9 @@ include_directories(${PROJECT_BINARY_DIR}) enable_language(Fortran) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS") +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") +endif() if(WIN32) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.ps1 From b4f4ed378b2343b0af8b1235838feef4f6c8c51c Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 30 Jul 2021 14:21:08 +0200 Subject: [PATCH 2/4] Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 --- test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d338242ff..e4ee8b28b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,10 @@ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) enable_language(Fortran) +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") +endif() + if (BUILD_SINGLE) list( APPEND OpenBLAS_Tests sblat1 sblat2 sblat3) From e78fbe46541dedcf39eb0362e69b1de6f7808642 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 30 Jul 2021 14:44:54 +0200 Subject: [PATCH 3/4] Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 --- ctest/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ctest/Makefile b/ctest/Makefile index 15c83a907..c5e1094da 100644 --- a/ctest/Makefile +++ b/ctest/Makefile @@ -6,6 +6,9 @@ TOPDIR = .. include $(TOPDIR)/Makefile.system override CFLAGS += -DADD$(BU) -DCBLAS +ifeq ($(F_COMPILER),GFORTRAN) + override FFLAGS += -fno-tree-vectorize +endif override TARGET_ARCH= override TARGET_MACH= From 5dc6aa74f05cc6c4405be195461fa5afc2c03888 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 30 Jul 2021 14:46:19 +0200 Subject: [PATCH 4/4] Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 --- test/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 6c5f041c2..923f1537c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,8 @@ TOPDIR = .. include ../Makefile.system - +ifeq ($(F_COMPILER),GFORTRAN) + override FFLAGS += -fno-tree-vectorize +endif ifeq ($(NOFORTRAN),1) all ::