+
+ifdef USE_THREAD
+ifeq ($(USE_THREAD), 0)
+USE_OPENMP = 0
+else
+USE_OPENMP = 1
+endif
+else
+USE_OPENMP = 1
+endif
+
+
+
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
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math
endif
+endif
+
FLAMEPATH = $(HOME)/flame/lib
# USE_THREAD = 0
# 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
# You can define maximum number of threads. Basically it should be
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
smallscaling: smallscaling.c ../$(LIBNAME)
- $(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm
+ $(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread
clean ::
- @rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl
+ @rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling
include $(TOPDIR)/Makefile.tail
#include <time.h>
#include <cblas.h>
#include <omp.h>
+#include <pthread.h>
#define MIN_SIZE 5
#define MAX_SIZE 60
#define NB_SIZE 10