Merge pull request #1169 from martin-frbg/cblas_xerbla
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Thu, 4 May 2017 17:32:50 +0000 (19:32 +0200)
committerGitHub <noreply@github.com>
Thu, 4 May 2017 17:32:50 +0000 (19:32 +0200)
Add trivial implementation of cblas_xerbla

interface/Makefile
interface/xerbla.c [new file with mode: 0644]

index 713a8c0..9b2b93b 100644 (file)
@@ -315,7 +315,7 @@ CCBLAS3OBJS   = \
        cblas_csyrk.$(SUFFIX) cblas_csyr2k.$(SUFFIX) \
        cblas_chemm.$(SUFFIX) cblas_cherk.$(SUFFIX) cblas_cher2k.$(SUFFIX) \
        cblas_comatcopy.$(SUFFIX) cblas_cimatcopy.$(SUFFIX)\
-       cblas_cgeadd.$(SUFFIX)
+       cblas_cgeadd.$(SUFFIX) cblas_xerbla.$(SUFFIX)
 
 
 
@@ -2137,3 +2137,5 @@ cblas_cgeadd.$(SUFFIX) cblas_cgeadd.$(PSUFFIX) : zgeadd.c
 cblas_zgeadd.$(SUFFIX) cblas_zgeadd.$(PSUFFIX) : zgeadd.c
        $(CC) -c $(CFLAGS) -DCBLAS $< -o $(@F)
 
+cblas_xerbla.$(SUFFIX) cblas_xerbla.$(PSUFFIX) : xerbla.c
+       $(CC) -c $(CFLAGS) -DCBLAS $< -o $(@F)
diff --git a/interface/xerbla.c b/interface/xerbla.c
new file mode 100644 (file)
index 0000000..c3a1745
--- /dev/null
@@ -0,0 +1,22 @@
+#ifdef CBLAS
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include "common.h"
+
+void CNAME(blasint p, char *rout, char *form, ...)
+{
+   va_list args;
+
+   va_start(args, form);
+
+   if (p)
+      fprintf(stderr, "Parameter %d to routine %s was incorrect\n", p, rout);
+   vfprintf(stderr, form, args);
+   va_end(args);
+   exit(-1);
+}
+#endif
+