@@ -1,7 +1,26 @@ | |||||
ifdef USE_THREAD | |||||
ifeq ($(USE_THREAD), 0) | |||||
USE_OPENMP = 0 | |||||
else | |||||
USE_OPENMP = 1 | |||||
endif | |||||
else | |||||
USE_OPENMP = 1 | |||||
endif | |||||
ifeq ($(CORE), POWER8) | ifeq ($(CORE), POWER8) | ||||
ifeq ($(USE_OPENMP), 1) | |||||
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DALLOC_SHM -DUSE_OPENMP -fno-fast-math -fopenmp | |||||
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp | |||||
else | |||||
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DALLOC_SHM -fno-fast-math | COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DALLOC_SHM -fno-fast-math | ||||
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math | FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math | ||||
endif | endif | ||||
endif | |||||
FLAMEPATH = $(HOME)/flame/lib | FLAMEPATH = $(HOME)/flame/lib | ||||
@@ -52,7 +52,7 @@ VERSION = 0.2.19.dev | |||||
# USE_THREAD = 0 | # USE_THREAD = 0 | ||||
# If you're going to use this library with OpenMP, please comment it in. | # If you're going to use this library with OpenMP, please comment it in. | ||||
# always use this flag for POWER8 | |||||
# This flag is always set for POWER8. Don't modify the flag | |||||
# USE_OPENMP = 1 | # USE_OPENMP = 1 | ||||
# You can define maximum number of threads. Basically it should be | # You can define maximum number of threads. Basically it should be | ||||
@@ -2231,10 +2231,10 @@ zgemm3m.$(SUFFIX) : gemm3m.c | |||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^ | $(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^ | ||||
smallscaling: smallscaling.c ../$(LIBNAME) | smallscaling: smallscaling.c ../$(LIBNAME) | ||||
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm | |||||
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread | |||||
clean :: | clean :: | ||||
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl | |||||
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling | |||||
include $(TOPDIR)/Makefile.tail | include $(TOPDIR)/Makefile.tail | ||||
@@ -5,6 +5,7 @@ | |||||
#include <time.h> | #include <time.h> | ||||
#include <cblas.h> | #include <cblas.h> | ||||
#include <omp.h> | #include <omp.h> | ||||
#include <pthread.h> | |||||
#define MIN_SIZE 5 | #define MIN_SIZE 5 | ||||
#define MAX_SIZE 60 | #define MAX_SIZE 60 | ||||
#define NB_SIZE 10 | #define NB_SIZE 10 | ||||