Index: BLAS/xGEMM/xGEMM.c
===================================================================
--- BLAS/xGEMM/xGEMM.c	(revision 249)
+++ BLAS/xGEMM/xGEMM.c	(revision 250)
@@ -30,8 +30,7 @@
 #include "fortran_common.h"
 #include "fortran_thunking.h"
 #elif FBLAS
-#include <cblas.h>
-#include <cblas_f77.h>
+#include <f77blas.h>
 #elif GSL
 #include <gsl_cblas.h>
 #elif ACML
@@ -43,7 +42,7 @@
 
 #ifdef CLBLAS
 
-#ifdef DOUBLE
+#ifdef FP64
 #define LENGTH cl_double
 #else
 #define LENGTH cl_float
@@ -51,7 +50,7 @@
 
 #else
 
-#ifdef DOUBLE
+#ifdef FP64
 #define LENGTH double
 #else
 #define LENGTH float
@@ -59,20 +58,20 @@
 
 #endif
 
-#ifdef FBLAS
+/* #ifdef FBLAS */
 
-#ifdef DOUBLE
+/* #ifdef FP64 */
 
-void F77_dgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, 
-	       const double *, FINT, const double *, double *, FINT);
+/* void F77_dgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT,  */
+/* 	       const double *, FINT, const double *, double *, FINT); */
 
-#else
+/* #else */
 
-void F77_sgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, 
-	       const float *, FINT, const float *, float *, FINT);
+/* void F77_sgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT,  */
+/* 	       const float *, FINT, const float *, float *, FINT); */
 
-#endif
-#endif
+/* #endif */
+/* #endif */
 
 /* Matrix with only defined triangular terms */
 /* Even if there are 0 in matrix, must be defined at all ! */
@@ -312,7 +311,7 @@
   /* Get third timer after memory operation */
   gettimeofday(&tv3, &tz);
 
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {
@@ -428,7 +427,7 @@
   /* Get third timer after memory operation */
   gettimeofday(&tv3, &tz);
 
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {
@@ -473,7 +472,7 @@
   printf("Using CuBLAS/Thunking: %i iterations for %ix%i matrix\n",
 	 RUNS,dim,dim);
 
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {      
@@ -503,20 +502,20 @@
   printf("Using FBLAS: %i iterations for %ix%i matrix\n",
 	 RUNS,dim,dim);
   
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {    
-      F77_dgemm(&transa,&transa,&dim,&dim,&dim,&alpha,B,&dim,A,&dim,&beta,C,&dim);
-      F77_dgemm(&transb,&transb,&dim,&dim,&dim,&alpha,A,&dim,B,&dim,&beta,D,&dim);
+      dgemm_(&transa,&transa,&dim,&dim,&dim,&alpha,B,&dim,A,&dim,&beta,C,&dim);
+      dgemm_(&transb,&transb,&dim,&dim,&dim,&alpha,A,&dim,B,&dim,&beta,D,&dim);
     }
 
 #else
 
   for (i=0;i<RUNS;i++)
     {    
-      F77_sgemm(&transa,&transa,&dim,&dim,&dim,&alpha,B,&dim,A,&dim,&beta,C,&dim);
-      F77_sgemm(&transb,&transb,&dim,&dim,&dim,&alpha,A,&dim,B,&dim,&beta,D,&dim);
+      sgemm_(&transa,&transa,&dim,&dim,&dim,&alpha,B,&dim,A,&dim,&beta,C,&dim);
+      sgemm_(&transb,&transb,&dim,&dim,&dim,&alpha,A,&dim,B,&dim,&beta,D,&dim);
     }
 
 #endif
@@ -529,7 +528,7 @@
   printf("Using ACML: %i iterations for %ix%i matrix\n",
 	 RUNS,dim,dim);
   
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {    
@@ -558,7 +557,7 @@
      NonUnit : Matrix is not unit
    */
 
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {  
@@ -591,7 +590,7 @@
      NonUnit : Matrix is not unit
    */
 
-#ifdef DOUBLE
+#ifdef FP64
 
   for (i=0;i<RUNS;i++)
     {  
Index: BLAS/xGEMM/Makefile
===================================================================
--- BLAS/xGEMM/Makefile	(revision 249)
+++ BLAS/xGEMM/Makefile	(revision 250)
@@ -1,3 +1,5 @@
+# Makefile designed for Debian Buster
+
 SOURCE=xGEMM.c
 
 CC=gcc
@@ -4,43 +6,34 @@
 FC=gfortran
 CFLAGS=-Wall -O3 -ffast-math
 LDFLAGS=-lm
-#CUDASRC=/usr/share/doc/nvidia-cuda-doc/examples/
-CUDASRC=/usr/share/doc/nvidia-cuda-toolkit/examples/
-THUNKING=fortran_thunking.c
-CUDASRCINC=fortran_common.h
-CUDAINC=/usr/include
-CUDALIB=/usr/lib/x86_64-linux-gnu/
+
 CLBLASINC=/usr/include
 CLBLASLIB=/usr/lib/x86_64-linux-gnu
-# CLBLASINC=/opt/clBLAS/src
-# CLBLASLIB=/opt/clBLAS/src/library/
 
-PATCHTHUNKING=patch_thunking.h
+CUDALIB?=/usr/lib/x86_64-linux-gnu/
+CUDAINC?=/usr/include
+CUDASRC?=/usr/share/doc/nvidia-cuda-toolkit/examples/
+THUNKING=fortran_thunking.c
+CUDASRCINC=fortran_common.h
 
 GSLINC=/usr/include/gsl
 
-GOTO2=/opt/GotoBLAS2
+# OPENBLAS=/usr/lib/x86_64-linux-gnu
+# ATLAS=/usr/lib/x86_64-linux-gnu
 
-#OPENBLAS=/usr/lib/openblas-base
-OPENBLAS=/usr/lib/x86_64-linux-gnu
-
 ACML=/opt/acml
 ACMLINC=$(ACML)/gfortran64_mp/include
 ACMLLIB=$(ACML)/gfortran64_mp/lib
 
-ATLAS=/usr/lib/atlas-base
+#EXECUTABLE=gsl cblas fblas openblas clblas cublas acml thunking
+EXECUTABLE=gsl cblas fblas openblas clblas cublas thunking
 
-#EXECUTABLE=cblas fblas gsl cublas thunking openblas acml clblas
-#EXECUTABLE=cblas fblas gsl cublas thunking openblas clblas
-#EXECUTABLE=gsl openblas clblas cublas thunking
-#EXECUTABLE=openblas clblas cublas thunking
-#EXECUTABLE=acml gsl cblas fblas openblas clblas cublas thunking
-#EXECUTABLE=gsl cblas fblas openblas clblas cublas thunking
-EXECUTABLE=gsl cblas openblas clblas cublas thunking
+# FORMAT define the precision of Floating Point numbers
+# FP32 for simple of 32 bits size
+# FP64 for double of 64 bits size
+FORMAT=FP64
+#FORMAT=FP32
 
-FORMAT=DOUBLE
-#FORMAT=FLOAT
-
 #DIRECTIVES=-D$(FORMAT) -DPRINT -DUNIT
 #DIRECTIVES=-D$(FORMAT) -DUNIT -DRESULTS -DQUIET
 DIRECTIVES=-DUNIT -DQUIET
@@ -49,74 +42,74 @@
 
 cblas: $(SOURCE)
 
-	$(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DFLOAT -DCBLAS $(LDFLAGS) \
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP32 -DCBLAS $(LDFLAGS) \
 		$(SOURCE) -latlas -lcblas -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DDOUBLE -DCBLAS $(LDFLAGS) \
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP64 -DCBLAS $(LDFLAGS) \
 		$(SOURCE) -latlas -lcblas -o $(SOURCE:.c=)_DP_$@
 
-gotoblas: $(SOURCE)
-
-	$(CC) $(CFLAGS) $(DIRECTIVES) -DFLOAT -DCBLAS $(LDFLAGS) \
-		$(SOURCE) $(GOTO2)/libgoto2.a -lpthread -o $(SOURCE:.c=)_SP_$@
-
-	$(CC) $(CFLAGS) $(DIRECTIVES) -DDOUBLE -DCBLAS $(LDFLAGS) \
-		$(SOURCE) $(GOTO2)/libgoto2.a -lpthread -o $(SOURCE:.c=)_DP_$@
-
 openblas: $(SOURCE)
 
-	$(CC) $(CFLAGS) $(DIRECTIVES) -L/usr/include/openblas -fopenmp -DFLOAT -DCBLAS $(LDFLAGS) \
-		$(SOURCE) $(OPENBLAS)/libopenblas.a -lpthread -o $(SOURCE:.c=)_SP_$@
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP32 -DCBLAS $(LDFLAGS) \
+		$(SOURCE) -lopenblas -lpthread -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) $(CFLAGS) $(DIRECTIVES) -L/usr/include/openblas -fopenmp -DDOUBLE -DCBLAS $(LDFLAGS) \
-		$(SOURCE) $(OPENBLAS)/libopenblas.a -lpthread -o $(SOURCE:.c=)_DP_$@
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP64 -DCBLAS $(LDFLAGS) \
+		$(SOURCE) -lopenblas -lpthread -o $(SOURCE:.c=)_DP_$@
 
 acml: $(SOURCE)
 
-	$(CC) -I$(ACMLINC) $(CFLAGS) $(DIRECTIVES) -DFLOAT -DACML $(LDFLAGS) \
+	$(CC) -I$(ACMLINC) $(CFLAGS) $(DIRECTIVES) -DFP32 -DACML $(LDFLAGS) \
 		$(SOURCE) -L$(ACMLLIB) -lacml_mp \
 		-lgomp -lgfortran -lpthread -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -I$(ACMLINC) $(CFLAGS) $(DIRECTIVES) -DDOUBLE -DACML $(LDFLAGS) \
+	$(CC) -I$(ACMLINC) $(CFLAGS) $(DIRECTIVES) -DFP64 -DACML $(LDFLAGS) \
 		$(SOURCE) -L$(ACMLLIB) -lacml_mp \
 		-lgomp -lgfortran -lpthread -o $(SOURCE:.c=)_DP_$@
 
 fblas: $(SOURCE)
 
-	$(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DFLOAT -DFBLAS $(LDFLAGS) \
-		$(SOURCE) -latlas -lf77blas -o $(SOURCE:.c=)_SP_$@
+	# ATLAS version
+	# $(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DFP32 -DFBLAS $(LDFLAGS) \
+	# 	$(SOURCE) -latlas -lf77blas -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DDOUBLE -DFBLAS $(LDFLAGS) \
-		$(SOURCE) -latlas -lf77blas -o $(SOURCE:.c=)_DP_$@
+	# $(CC) -L$(ATLAS) $(CFLAGS) $(DIRECTIVES) -DFP64 -DFBLAS $(LDFLAGS) \
+	# 	$(SOURCE) -latlas -lf77blas -o $(SOURCE:.c=)_DP_$@
 
+	# OpenBLAS version
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP32 -DFBLAS $(LDFLAGS) \
+		$(SOURCE) -lopenblas -lpthread -o $(SOURCE:.c=)_SP_$@
 
+	$(CC) $(CFLAGS) $(DIRECTIVES) -DFP64 -DFBLAS $(LDFLAGS) \
+		$(SOURCE) -lopenblas -lpthread -o $(SOURCE:.c=)_DP_$@
+
+
 gsl: $(SOURCE)
 
-	$(CC) -I$(GSLINC) $(CFLAGS) $(DIRECTIVES) -DFLOAT \
+	$(CC) -I$(GSLINC) $(CFLAGS) $(DIRECTIVES) -DFP32 \
 		-DGSL $(LDFLAGS) \
 		$(SOURCE) -lgslcblas -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -I$(GSLINC) $(CFLAGS) $(DIRECTIVES) -DDOUBLE \
+	$(CC) -I$(GSLINC) $(CFLAGS) $(DIRECTIVES) -DFP64 \
 		-DGSL $(LDFLAGS) \
 		$(SOURCE) -lgslcblas -o $(SOURCE:.c=)_DP_$@
 
 clblas: $(SOURCE)
 
-	$(CC) -I$(CLBLASINC) -L$(CLBLASLIB) $(CFLAGS) -DFLOAT \
+	$(CC) -I$(CLBLASINC) -L$(CLBLASLIB) $(CFLAGS) -DFP32 \
 		-DCLBLAS $(LDFLAGS) \
 		$(DIRECTIVES) $(SOURCE) -lclBLAS -lOpenCL -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -I$(CLBLASINC) -L$(CLBLASLIB) $(CFLAGS) -DDOUBLE \
+	$(CC) -I$(CLBLASINC) -L$(CLBLASLIB) $(CFLAGS) -DFP64 \
 		-DCLBLAS $(LDFLAGS) \
 		$(DIRECTIVES) $(SOURCE) -lclBLAS -lOpenCL -o $(SOURCE:.c=)_DP_$@
 
 cublas: $(SOURCE)
 
-	$(CC) -I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFLOAT \
+	$(CC) -I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFP32 \
 		-DCUBLAS $(LDFLAGS) \
 		$(DIRECTIVES) $(SOURCE) -lcublas -o $(SOURCE:.c=)_SP_$@
 
-	$(CC) -I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DDOUBLE \
+	$(CC) -I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFP64 \
 		-DCUBLAS $(LDFLAGS) \
 		$(DIRECTIVES) $(SOURCE) -lcublas -o $(SOURCE:.c=)_DP_$@
 
@@ -129,12 +122,12 @@
 	$(CC) -DCUBLAS_GFORTRAN -I$(CUDAINC) $(CFLAGS) -c $(THUNKING)
 
 	$(CC) -DCUBLAS_GFORTRAN \
-		-I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFLOAT -DTHUNKING \
+		-I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFP32 -DTHUNKING \
 		$(LDFLAGS) $(DIRECTIVES) $(SOURCE) \
 		$(THUNKING:.c=.o) -lcublas -o $(SOURCE:.c=)_SP_$@
 
 	$(CC) -DCUBLAS_GFORTRAN \
-		-I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DDOUBLE -DTHUNKING \
+		-I$(CUDAINC) -L$(CUDALIB) $(CFLAGS) -DFP64 -DTHUNKING \
 		$(LDFLAGS) $(DIRECTIVES) $(SOURCE) \
 		$(THUNKING:.c=.o) -lcublas -o $(SOURCE:.c=)_DP_$@
 
