From 6e3fb2ce52798fed50d1e7734a4bef2d1f441e33 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 11:40:20 +0100 Subject: [PATCH 1/7] fix conditional build rule --- lapack/laed3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack/laed3/Makefile b/lapack/laed3/Makefile index 9fa75613a7..3a06e2be80 100644 --- a/lapack/laed3/Makefile +++ b/lapack/laed3/Makefile @@ -9,7 +9,7 @@ SBLASOBJS += slaed3_parallel.$(SUFFIX) DBLASOBJS += dlaed3_parallel.$(SUFFIX) endif -ifeq "$(or $(BUILD_SINGLE),$(BUILD_DOUBLE))" "" +ifeq "$(or $(BUILD_SINGLE),$(BUILD_COMPLEX))" "" SBLASOBJS= endif ifneq ($(BUILD_DOUBLE),1) From d0a6e3689624902d407b10a58784840b5e20b2b5 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 11:41:25 +0100 Subject: [PATCH 2/7] Fix rules for running the GEMM3M tests --- test/Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 8b69976f76..f653b70b13 100644 --- a/test/Makefile +++ b/test/Makefile @@ -246,15 +246,19 @@ endif ifeq ($(BUILD_COMPLEX),1) ifeq ($(SUPPORT_GEMM3M),1) C3=cblat3 cblat3_3m +C3M=cblat3_3m else C3=cblat3 +C3M= endif endif ifeq ($(BUILD_COMPLEX16),1) ifeq ($(SUPPORT_GEMM3M),1) Z3=zblat3 zblat3_3m +Z3M=zblat3_3m else Z3=zblat3 +Z3M= endif endif @@ -342,28 +346,40 @@ endif endif -level3_3m: zblat3_3m cblat3_3m +level3_3m: $(C3M) $(Z3M) ifneq ($(CROSS), 1) rm -f ?BLAT3_3M.SUMM +ifeq ($(BUILD_COMPLEX),1) OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat3_3m < ./cblat3_3m.dat @$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0 +endif +ifeq ($(BUILD_COMPLEX16),1) OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat3_3m < ./zblat3_3m.dat @$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0 +endif ifdef SMP rm -f ?BLAT3_3M.SUMM ifeq ($(USE_OPENMP), 1) +ifeq ($(BUILD_COMPLEX),1) OMP_NUM_THREADS=2 ./cblat3_3m < ./cblat3_3m.dat @$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0 +endif +ifeq ($(BUILD_COMPLEX16),1) OMP_NUM_THREADS=2 ./zblat3_3m < ./zblat3_3m.dat @$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0 +endif else +ifeq ($(BUILD_COMPLEX),1) OPENBLAS_NUM_THREADS=2 ./cblat3_3m < ./cblat3_3m.dat @$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0 +endif +ifeq ($(BUILD_COMPLEX16),1) OPENBLAS_NUM_THREADS=2 ./zblat3_3m < ./zblat3_3m.dat @$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0 endif endif endif +endif From 7d7a6c670820ab3bdaa80f4e258566cb5ebecbe9 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 11:43:43 +0100 Subject: [PATCH 3/7] Build the comparison functions as needed to avoid missing references --- utest/test_extensions/common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utest/test_extensions/common.c b/utest/test_extensions/common.c index a5d3196aaf..5f651a327a 100644 --- a/utest/test_extensions/common.c +++ b/utest/test_extensions/common.c @@ -50,6 +50,7 @@ void drand_generate(double *alpha, blasint n) alpha[i] = (double)rand() / (double)RAND_MAX; } +#ifdef BUILD_SINGLE /** * Find difference between two rectangle matrix * return norm of differences @@ -76,7 +77,8 @@ float smatrix_difference(float *a, float *b, blasint cols, blasint rows, blasint } return norm/(float)(rows); } - +#endif +#ifdef BUILD_DOUBLE double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blasint ld) { blasint i = 0; @@ -99,7 +101,7 @@ double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blas } return norm/(double)(rows); } - +#endif /** * Complex conjugate operation for vector * From 92b4d1b6f31157852e5fe1f3ea32b9d3a64093d1 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 19:06:17 +0100 Subject: [PATCH 4/7] make SLAED/DLAED definitions available to COMPLEX too --- common_macro.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common_macro.h b/common_macro.h index 745643fa89..4051cb3794 100644 --- a/common_macro.h +++ b/common_macro.h @@ -3159,6 +3159,8 @@ typedef struct { #define NEG_TCOPY ZNEG_TCOPY #define LARF_L ZLARF_L #define LARF_R ZLARF_R +#define LAED3_SINGLE dlaed3_single +#define LAED3_PARALLEL dlaed3_parallel #else #define GETF2 CGETF2 #define GETRF CGETRF @@ -3180,6 +3182,8 @@ typedef struct { #define NEG_TCOPY CNEG_TCOPY #define LARF_L CLARF_L #define LARF_R CLARF_R +#define LAED3_SINGLE slaed3_single +#define LAED3_PARALLEL slaed3_parallel #endif #endif From 0e28b427f33cd51aee012c3d15f4a6f9618e2df4 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 19:09:36 +0100 Subject: [PATCH 5/7] Add slaed3/dlaed3 to complex builds --- interface/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/Makefile b/interface/Makefile index 83a894b125..2b6b60c142 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -530,8 +530,8 @@ ifneq ($(NO_LAPACK), 1) SBLASOBJS += $(SLAPACKOBJS) DBLASOBJS += $(DLAPACKOBJS) #QBLASOBJS += $(QLAPACKOBJS) -CBLASOBJS += $(CLAPACKOBJS) -ZBLASOBJS += $(ZLAPACKOBJS) +CBLASOBJS += $(CLAPACKOBJS) slaed3.$(SUFFIX) +ZBLASOBJS += $(ZLAPACKOBJS) dlaed3.$(SUFFIX) #XBLASOBJS += $(XLAPACKOBJS) endif From 7d431f3bb076f0121caf20514d2f84d112d69b3e Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 19:10:53 +0100 Subject: [PATCH 6/7] fix conditional build for double and complex too --- lapack/laed3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapack/laed3/Makefile b/lapack/laed3/Makefile index 3a06e2be80..0ad584e62f 100644 --- a/lapack/laed3/Makefile +++ b/lapack/laed3/Makefile @@ -12,7 +12,7 @@ endif ifeq "$(or $(BUILD_SINGLE),$(BUILD_COMPLEX))" "" SBLASOBJS= endif -ifneq ($(BUILD_DOUBLE),1) +ifeq "$(or $(BUILD_DOUBLE),$(BUILD_COMPLEX16))" "" DBLASOBJS= endif From 7fe8bd80461edde0297fdbe7f7a091b1b9c4798d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 18 Feb 2026 19:12:35 +0100 Subject: [PATCH 7/7] build comparison functions for complex cases too --- utest/test_extensions/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utest/test_extensions/common.c b/utest/test_extensions/common.c index 5f651a327a..d2f43e1a8a 100644 --- a/utest/test_extensions/common.c +++ b/utest/test_extensions/common.c @@ -50,7 +50,7 @@ void drand_generate(double *alpha, blasint n) alpha[i] = (double)rand() / (double)RAND_MAX; } -#ifdef BUILD_SINGLE +#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX) /** * Find difference between two rectangle matrix * return norm of differences @@ -78,7 +78,7 @@ float smatrix_difference(float *a, float *b, blasint cols, blasint rows, blasint return norm/(float)(rows); } #endif -#ifdef BUILD_DOUBLE +#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16) double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blasint ld) { blasint i = 0;