Skip to content

Commit 43728ad

Browse files
authored
Merge pull request #5651 from martin-frbg/issue5650
Fix gmake build with only a subset of precision types
2 parents 822aae6 + 7fe8bd8 commit 43728ad

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

common_macro.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,6 +3159,8 @@ typedef struct {
31593159
#define NEG_TCOPY ZNEG_TCOPY
31603160
#define LARF_L ZLARF_L
31613161
#define LARF_R ZLARF_R
3162+
#define LAED3_SINGLE dlaed3_single
3163+
#define LAED3_PARALLEL dlaed3_parallel
31623164
#else
31633165
#define GETF2 CGETF2
31643166
#define GETRF CGETRF
@@ -3180,6 +3182,8 @@ typedef struct {
31803182
#define NEG_TCOPY CNEG_TCOPY
31813183
#define LARF_L CLARF_L
31823184
#define LARF_R CLARF_R
3185+
#define LAED3_SINGLE slaed3_single
3186+
#define LAED3_PARALLEL slaed3_parallel
31833187
#endif
31843188
#endif
31853189

interface/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ ifneq ($(NO_LAPACK), 1)
530530
SBLASOBJS += $(SLAPACKOBJS)
531531
DBLASOBJS += $(DLAPACKOBJS)
532532
#QBLASOBJS += $(QLAPACKOBJS)
533-
CBLASOBJS += $(CLAPACKOBJS)
534-
ZBLASOBJS += $(ZLAPACKOBJS)
533+
CBLASOBJS += $(CLAPACKOBJS) slaed3.$(SUFFIX)
534+
ZBLASOBJS += $(ZLAPACKOBJS) dlaed3.$(SUFFIX)
535535
#XBLASOBJS += $(XLAPACKOBJS)
536536

537537
endif

lapack/laed3/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ SBLASOBJS += slaed3_parallel.$(SUFFIX)
99
DBLASOBJS += dlaed3_parallel.$(SUFFIX)
1010
endif
1111

12-
ifeq "$(or $(BUILD_SINGLE),$(BUILD_DOUBLE))" ""
12+
ifeq "$(or $(BUILD_SINGLE),$(BUILD_COMPLEX))" ""
1313
SBLASOBJS=
1414
endif
15-
ifneq ($(BUILD_DOUBLE),1)
15+
ifeq "$(or $(BUILD_DOUBLE),$(BUILD_COMPLEX16))" ""
1616
DBLASOBJS=
1717
endif
1818

test/Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,19 @@ endif
246246
ifeq ($(BUILD_COMPLEX),1)
247247
ifeq ($(SUPPORT_GEMM3M),1)
248248
C3=cblat3 cblat3_3m
249+
C3M=cblat3_3m
249250
else
250251
C3=cblat3
252+
C3M=
251253
endif
252254
endif
253255
ifeq ($(BUILD_COMPLEX16),1)
254256
ifeq ($(SUPPORT_GEMM3M),1)
255257
Z3=zblat3 zblat3_3m
258+
Z3M=zblat3_3m
256259
else
257260
Z3=zblat3
261+
Z3M=
258262
endif
259263
endif
260264

@@ -342,28 +346,40 @@ endif
342346
endif
343347

344348

345-
level3_3m: zblat3_3m cblat3_3m
349+
level3_3m: $(C3M) $(Z3M)
346350
ifneq ($(CROSS), 1)
347351
rm -f ?BLAT3_3M.SUMM
352+
ifeq ($(BUILD_COMPLEX),1)
348353
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat3_3m < ./cblat3_3m.dat
349354
@$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0
355+
endif
356+
ifeq ($(BUILD_COMPLEX16),1)
350357
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat3_3m < ./zblat3_3m.dat
351358
@$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0
359+
endif
352360
ifdef SMP
353361
rm -f ?BLAT3_3M.SUMM
354362
ifeq ($(USE_OPENMP), 1)
363+
ifeq ($(BUILD_COMPLEX),1)
355364
OMP_NUM_THREADS=2 ./cblat3_3m < ./cblat3_3m.dat
356365
@$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0
366+
endif
367+
ifeq ($(BUILD_COMPLEX16),1)
357368
OMP_NUM_THREADS=2 ./zblat3_3m < ./zblat3_3m.dat
358369
@$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0
370+
endif
359371
else
372+
ifeq ($(BUILD_COMPLEX),1)
360373
OPENBLAS_NUM_THREADS=2 ./cblat3_3m < ./cblat3_3m.dat
361374
@$(GREP) -q FATAL CBLAT3_3M.SUMM && cat CBLAT3_3M.SUMM || exit 0
375+
endif
376+
ifeq ($(BUILD_COMPLEX16),1)
362377
OPENBLAS_NUM_THREADS=2 ./zblat3_3m < ./zblat3_3m.dat
363378
@$(GREP) -q FATAL ZBLAT3_3M.SUMM && cat ZBLAT3_3M.SUMM || exit 0
364379
endif
365380
endif
366381
endif
382+
endif
367383

368384

369385

utest/test_extensions/common.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ void drand_generate(double *alpha, blasint n)
5050
alpha[i] = (double)rand() / (double)RAND_MAX;
5151
}
5252

53+
#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX)
5354
/**
5455
* Find difference between two rectangle matrix
5556
* return norm of differences
@@ -76,7 +77,8 @@ float smatrix_difference(float *a, float *b, blasint cols, blasint rows, blasint
7677
}
7778
return norm/(float)(rows);
7879
}
79-
80+
#endif
81+
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
8082
double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blasint ld)
8183
{
8284
blasint i = 0;
@@ -99,7 +101,7 @@ double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blas
99101
}
100102
return norm/(double)(rows);
101103
}
102-
104+
#endif
103105
/**
104106
* Complex conjugate operation for vector
105107
*

0 commit comments

Comments
 (0)