Revision 1727c0f0bd69f3f0390ca0760967e6b3108bf774 authored by AndyGreenwell on 12 February 2016, 19:16:40 UTC, committed by Tony Kelman on 07 March 2016, 16:46:36 UTC
This change updates the gcc command line to include linking to libstdc++.so.6 (on Linux, may need modification for other OS's), and also adds instructions for setting JULIA_HOME such that the compiled example executes successfully. (cherry picked from commit aa672af94e52abf64d77b3ed860965902376b7bd) ref #15049
1 parent 9942234
openblas-win64.patch
commit 640cccc2b159dba6d99b9eea11b7f23f98d6c85d
Author: Zhang Xianyi <traits.zhang@gmail.com>
Date: Mon Nov 30 15:19:45 2015 -0600
Refs #697. Fixed gemv bug for Windows.
Thank matzeri's patch.
diff --git a/interface/gemv.c b/interface/gemv.c
index 0a222a6..97c68bf 100644
--- a/interface/gemv.c
+++ b/interface/gemv.c
@@ -37,6 +37,7 @@
/*********************************************************************/
#include <stdio.h>
+#include <assert.h>
#include "common.h"
#include "l1param.h"
#ifdef FUNCTION_PROFILE
@@ -224,13 +225,17 @@ void CNAME(enum CBLAS_ORDER order,
#ifdef ALIGNED_ACCESS
stack_alloc_size += 3;
#endif
- if(stack_alloc_size < 128)
+// if(stack_alloc_size < 128)
//dgemv_n.S require a 128 bytes buffer
- stack_alloc_size = 128;
+// increasing instead of capping 128
+// ABI STACK for windows 288 bytes
+ stack_alloc_size += 288 / sizeof(FLOAT) ;
if(stack_alloc_size > MAX_STACK_ALLOC / sizeof(FLOAT))
stack_alloc_size = 0;
+// stack overflow check
+ volatile double stack_check = 3.14159265358979323846;
FLOAT stack_buffer[stack_alloc_size];
buffer = stack_alloc_size ? stack_buffer : (FLOAT *)blas_memory_alloc(1);
// printf("stack_alloc_size=%d\n", stack_alloc_size);
@@ -265,6 +270,8 @@ void CNAME(enum CBLAS_ORDER order,
}
#endif
+// stack overflow check
+assert(stack_check==3.14159265358979323846);
#ifdef MAX_STACK_ALLOC
if(!stack_alloc_size){
diff --git a/exports/Makefile b/exports/Makefile
index 177e975..29a9ca8 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -96,9 +96,9 @@ libgoto_hpl.def : gensymbol
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
$(LIBDYNNAME) : ../$(LIBNAME) osx.def
else
-../$(LIBNAME).renamed : ../$(LIBNAME) objconv.def
- $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed
-$(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def
+../$(LIBNAME).osx.renamed : ../$(LIBNAME) objconv.def
+ $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).osx.renamed
+$(LIBDYNNAME) : ../$(LIBNAME).osx.renamed osx.def
endif
ifeq ($(NOFORTRAN), $(filter $(NOFORTRAN),1 2))
#only build without Fortran
@@ -220,7 +220,7 @@ linktest.c : gensymbol ../Makefile.system ../getarch.c
perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > linktest.c
clean ::
- @rm -f *.def *.dylib __.SYMDEF*
+ @rm -f *.def *.dylib __.SYMDEF* *.renamed
include ../Makefile.tail
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...