added bugfixes for some make files and smallscaling.c
authorWerner Saar <wernsaar@googlemail.com>
Thu, 21 Apr 2016 10:54:32 +0000 (12:54 +0200)
committerWerner Saar <wernsaar@googlemail.com>
Thu, 21 Apr 2016 10:54:32 +0000 (12:54 +0200)
Makefile.power
Makefile.rule
benchmark/Makefile
benchmark/smallscaling.c

index ff7d8ed..48bcb77 100644 (file)
@@ -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 ($(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
 
index 4b9d36b..2d27237 100644 (file)
@@ -52,7 +52,7 @@ VERSION = 0.2.19.dev
 # 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
index 0a13592..38ccb8f 100644 (file)
@@ -2231,10 +2231,10 @@ zgemm3m.$(SUFFIX) : gemm3m.c
        $(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
 
index 9068c61..c5dcc58 100644 (file)
@@ -5,6 +5,7 @@
 #include <time.h>
 #include <cblas.h>
 #include <omp.h>
+#include <pthread.h>
 #define MIN_SIZE 5
 #define MAX_SIZE 60
 #define NB_SIZE 10