Skip to content

Commit dd2b897

Browse files
committed
added bugfixes for some make files and smallscaling.c
1 parent 9276c90 commit dd2b897

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

Makefile.power

+19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1+
2+
ifdef USE_THREAD
3+
ifeq ($(USE_THREAD), 0)
4+
USE_OPENMP = 0
5+
else
6+
USE_OPENMP = 1
7+
endif
8+
else
9+
USE_OPENMP = 1
10+
endif
11+
12+
13+
114
ifeq ($(CORE), POWER8)
15+
ifeq ($(USE_OPENMP), 1)
16+
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DALLOC_SHM -DUSE_OPENMP -fno-fast-math -fopenmp
17+
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp
18+
else
219
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DALLOC_SHM -fno-fast-math
320
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math
421
endif
22+
endif
23+
524

625
FLAMEPATH = $(HOME)/flame/lib
726

Makefile.rule

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ VERSION = 0.2.19.dev
5252
# USE_THREAD = 0
5353

5454
# If you're going to use this library with OpenMP, please comment it in.
55-
# always use this flag for POWER8
55+
# This flag is always set for POWER8. Don't modify the flag
5656
# USE_OPENMP = 1
5757

5858
# You can define maximum number of threads. Basically it should be

benchmark/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2231,10 +2231,10 @@ zgemm3m.$(SUFFIX) : gemm3m.c
22312231
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
22322232

22332233
smallscaling: smallscaling.c ../$(LIBNAME)
2234-
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm
2234+
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread
22352235

22362236
clean ::
2237-
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl
2237+
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling
22382238

22392239
include $(TOPDIR)/Makefile.tail
22402240

benchmark/smallscaling.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <time.h>
66
#include <cblas.h>
77
#include <omp.h>
8+
#include <pthread.h>
89
#define MIN_SIZE 5
910
#define MAX_SIZE 60
1011
#define NB_SIZE 10

0 commit comments

Comments
 (0)