From 3f5d145cd41a083d1a3eff33d1823ab6c261defe Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Sun, 24 Apr 2022 23:58:26 +0100 Subject: [PATCH 1/7] build: minor fixes to build on windows with make This patch contains following fixes 1. Fix to build without PIC flag 2. Define LAPACK_COMPLEX_STRUCTURE for windows. Builds are failing without it and changes are consistent with the CMake rules defined in system.cmake (line 576) --- Makefile.system | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.system b/Makefile.system index e90fd8ffa..ac60eae5b 100644 --- a/Makefile.system +++ b/Makefile.system @@ -1536,7 +1536,7 @@ override FFLAGS += $(COMMON_OPT) $(FCOMMON_OPT) override FPFLAGS += $(FCOMMON_OPT) $(COMMON_PROF) #MAKEOVERRIDES = -ifdef NEED_PIC +ifeq ($(NEED_PIC), 1) ifeq (,$(findstring PIC,$(FFLAGS))) override FFLAGS += -fPIC endif @@ -1566,6 +1566,7 @@ endif ifdef OS_WINDOWS LAPACK_CFLAGS += -DOPENBLAS_OS_WINDOWS +LAPACK_CFLAGS += -DLAPACK_COMPLEX_STRUCTURE endif ifeq ($(C_COMPILER), LSB) LAPACK_CFLAGS += -DLAPACK_COMPLEX_STRUCTURE From 3dd09e87bf71df5bb93a112a7d9482b9249ad9a0 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 27 Apr 2022 20:26:45 +0200 Subject: [PATCH 2/7] Update NOFORTRAN message for fallback to C_LAPACK --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6db87fa2d..1ed8180b8 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,7 @@ ifeq ($(CORE), UNKNOWN) $(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.) endif ifeq ($(NOFORTRAN), 1) - $(info OpenBLAS: Detecting fortran compiler failed. Cannot compile LAPACK. Only compile BLAS.) + $(info OpenBLAS: Detecting fortran compiler failed. Can only compile BLAS and f2c-converted LAPACK.) endif ifeq ($(NO_STATIC), 1) ifeq ($(NO_SHARED), 1) From 24e99eca316d1b4b256f56e877281d3b5c7a463a Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 27 Apr 2022 20:31:42 +0200 Subject: [PATCH 3/7] Avoid adding -lgfortran with NOFORTRAN --- Makefile.system | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.system b/Makefile.system index ac60eae5b..1d4ff6da1 100644 --- a/Makefile.system +++ b/Makefile.system @@ -1041,9 +1041,11 @@ FCOMMON_OPT += -frecursive # work around ABI problem with passing single-character arguments FCOMMON_OPT += -fno-optimize-sibling-calls #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc +ifneq ($(NOFORTRAN), 1) ifneq ($(NO_LAPACK), 1) EXTRALIB += -lgfortran endif +endif ifdef NO_BINARY_MODE ifeq ($(ARCH), $(filter $(ARCH),mips64)) ifdef BINARY64 From b4b9ccdbfac41c8f357b3a6f31e1c38830f0defc Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 27 Apr 2022 21:59:45 +0200 Subject: [PATCH 4/7] Remove leftover debug output --- lapack-netlib/SRC/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/lapack-netlib/SRC/Makefile b/lapack-netlib/SRC/Makefile index 11f858c0c..afeeeaf0b 100644 --- a/lapack-netlib/SRC/Makefile +++ b/lapack-netlib/SRC/Makefile @@ -58,7 +58,6 @@ TOPSRCDIR = .. include $(TOPSRCDIR)/make.inc ifneq ($(C_LAPACK), 1) -$(info fortran... C_LAPACK ist $(C_LAPACK)) .SUFFIXES: .SUFFIXES: .f .o .f.o: @@ -67,7 +66,6 @@ $(info fortran... C_LAPACK ist $(C_LAPACK)) .F.o: $(FC) $(FFLAGS) -c -o $@ $< else -$(info C_LAPACK ist $(C_LAPACK)) .SUFFIXES: .c .o .c.o: $(CC) $(CFLAGS) -c -o $@ $< From 11f023b71218c2ad8965777bb44c77be2b183a29 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 27 Apr 2022 22:18:22 +0200 Subject: [PATCH 5/7] fix arch tags --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85a57f6e3..251a81f94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,8 @@ matrix: # - BTYPE="BINARY=64" # # - <<: *test-ubuntu - os: linux-ppc64le + os: linux + arch: ppc64le before_script: &common-before - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=POWER8 NUM_THREADS=32" script: @@ -269,9 +270,9 @@ matrix: # - CFLAGS="-O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode-11.5.GM.Seed.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -arch armv7 -miphoneos-version-min=5.1" # - BTYPE="TARGET=ARMV7 HOSTCC=clang NOFORTRAN=1" - - &test-graviton2 + - &test-neoversen1 os: linux - arch: arm64-graviton2 + arch: arm64 dist: focal group: edge virt: lxd From adaf03835b9db541a54a47b7c7a3b114700c0a83 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 30 Apr 2022 18:33:00 +0200 Subject: [PATCH 6/7] try to fix assembler errors on z13 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 251a81f94..e06ec4d1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,7 @@ matrix: arch: s390x before_script: - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32" + - apt-get install --only-upgrade binutils env: # for matrix annotation only - TARGET_BOX=IBMZ_LINUX @@ -56,6 +57,7 @@ matrix: compiler: clang before_script: - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32" + - apt-get install --only-upgrade binutils env: # for matrix annotation only - TARGET_BOX=IBMZ_LINUX From 96ddadf16444de9a8d3d4b1fe0a2aaeb7984264d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 30 Apr 2022 18:49:04 +0200 Subject: [PATCH 7/7] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e06ec4d1b..f05148352 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ matrix: arch: s390x before_script: - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32" - - apt-get install --only-upgrade binutils + - sudo apt-get install --only-upgrade binutils env: # for matrix annotation only - TARGET_BOX=IBMZ_LINUX @@ -57,7 +57,7 @@ matrix: compiler: clang before_script: - COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32" - - apt-get install --only-upgrade binutils + - sudo apt-get install --only-upgrade binutils env: # for matrix annotation only - TARGET_BOX=IBMZ_LINUX