Skip to content

Commit b31ec99

Browse files
committed
Fixed #374.
Merge branch 'TimothyGu-develop' into develop
2 parents 0ac073f + ced1357 commit b31ec99

File tree

7 files changed

+20
-14
lines changed

7 files changed

+20
-14
lines changed

Changelog.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ common:
5151
parallelization model is used by OpenBLAS. (Thank grisuthedragon)
5252
* Detect LLVM/Clang compiler. The default compiler is Clang on Mac OS X.
5353
* Change LIBSUFFIX from .lib to .a on windows.
54-
* A walk round for dtrti_U single thread bug. Replace it with LAPACK codes. (#191)
54+
* A work-around for dtrti_U single thread bug. Replace it with LAPACK codes. (#191)
5555

5656
x86/x86-64:
5757
* Optimize c/zgemm, trsm, dgemv_n, ddot, daxpy, dcopy on
@@ -284,7 +284,7 @@ x86/x86_64:
284284
* Fixed #28 a wrong result of dsdot on x86_64.
285285
* Fixed #32 a SEGFAULT bug of zdotc with gcc-4.6.
286286
* Fixed #33 ztrmm bug on Nehalem.
287-
* Walk round #27 the low performance axpy issue with small imput size & multithreads.
287+
* Work-around #27 the low performance axpy issue with small imput size & multithreads.
288288

289289
MIPS64:
290290
* Fixed #28 a wrong result of dsdot on Loongson3A/MIPS64.
@@ -308,7 +308,7 @@ common:
308308

309309
x86/x86_64:
310310
* On x86 32bits, fixed a bug in zdot_sse2.S line 191. This would casue
311-
zdotu & zdotc failures.Instead,Walk around it. (Refs issue #8 #9 on github)
311+
zdotu & zdotc failures. Instead, work-around it. (Refs issue #8 #9 on github)
312312
* Modified ?axpy functions to return same netlib BLAS results
313313
when incx==0 or incy==0 (Refs issue #7 on github)
314314
* Modified ?swap functions to return same netlib BLAS results

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ ifeq ($(CORE), UNKOWN)
128128
endif
129129
ifeq ($(NOFORTRAN), 1)
130130
$(error OpenBLAS: Detecting fortran compiler failed. Please install fortran compiler, e.g. gfortran, ifort, openf90.)
131+
endif
132+
ifeq ($(NO_STATIC), 1)
133+
ifeq ($(NO_SHARED), 1)
134+
$(error OpenBLAS: neither static nor shared are enabled.)
135+
endif
131136
endif
132137
@-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
133138
@for d in $(SUBDIRS) ; \

Makefile.install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ ifndef NO_LAPACKE
5050
endif
5151

5252
#for install static library
53+
ifndef NO_STATIC
5354
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
5455
@install -pm644 $(LIBNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
5556
@cd $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) ; \
5657
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
58+
endif
5759
#for install shared library
5860
ifndef NO_SHARED
5961
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
@@ -80,6 +82,7 @@ ifeq ($(OSNAME), Darwin)
8082
endif
8183
ifeq ($(OSNAME), WINNT)
8284
@-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR)
85+
@-cp $(LIBDLLNAME).a $(OPENBLAS_LIBRARY_DIR)
8386
endif
8487
ifeq ($(OSNAME), CYGWIN_NT)
8588
@-cp $(LIBDLLNAME) $(OPENBLAS_BINARY_DIR)

Makefile.rule

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ VERSION = 0.2.9.rc2
4848
# automatically detected by the the script.
4949
# NUM_THREADS = 24
5050

51+
# if you don't need to install the static library, please comment it in.
52+
# NO_STATIC = 1
53+
5154
# if you don't need generate the shared library, please comment it in.
5255
# NO_SHARED = 1
5356

exports/Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,9 @@ dll : ../$(LIBDLLNAME)
8383
# For more details see: https://github.com/xianyi/OpenBLAS/issues/127.
8484
../$(LIBDLLNAME) : ../$(LIBNAME) libopenblas.def dllinit.$(SUFFIX)
8585
$(RANLIB) ../$(LIBNAME)
86-
ifeq ($(BINARY32), 1)
87-
$(DLLWRAP) -o ../$(LIBDLLNAME) --def libopenblas.def \
88-
--entry _dllinit@12 -s dllinit.$(SUFFIX) --dllname $(@F) ../$(LIBNAME) $(EXTRALIB)
89-
-lib /machine:i386 /def:libopenblas.def
90-
else
91-
$(DLLWRAP) -o ../$(LIBDLLNAME) --def libopenblas.def \
92-
--entry $(FU)dllinit -s dllinit.$(SUFFIX) --dllname $(@F) ../$(LIBNAME) $(EXTRALIB)
93-
-lib /machine:X64 /def:libopenblas.def
94-
endif
86+
$(CC) $(CFLAGS) $(LDFLAGS) libopenblas.def dllinit.$(SUFFIX) \
87+
-shared -o ../$(LIBDLLNAME) -Wl,--out-implib,../$(LIBDLLNAME).a \
88+
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB)
9589

9690
libopenblas.def : gensymbol
9791
perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F)

exports/dllinit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
void gotoblas_init(void);
4242
void gotoblas_quit(void);
4343

44-
BOOL APIENTRY dllinit(HINSTANCE hInst, DWORD reason, LPVOID reserved) {
44+
BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) {
4545

4646
if (reason == DLL_PROCESS_ATTACH) {
4747
gotoblas_init();

interface/axpy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc
8686
if (incx == 0 || incy == 0)
8787
nthreads = 1;
8888

89-
//Temporarily walk around the low performance issue with small imput size & multithreads.
89+
//Temporarily work-around the low performance issue with small imput size &
90+
//multithreads.
9091
if (n <= 10000)
9192
nthreads = 1;
9293

0 commit comments

Comments
 (0)