Skip to content

Commit

Permalink
Merge branch 'hotfix-v0.2.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyi committed Aug 1, 2013
2 parents f26b7a0 + b736aa8 commit 835293c
Show file tree
Hide file tree
Showing 29 changed files with 202 additions and 82 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,9 @@ In chronological order:
* [2013-07-11] create openblas_get_parallel to retrieve information which parallelization
model is used by OpenBLAS.

* Sébastien Fabbro <[email protected]>
* [2013-07-24] Modify makefile to respect user's LDFLAGS
* [2013-07-24] Add stack markings for GNU as arch-independent for assembler files

* [Your name or handle] <[email or website]>
* [Date] [Brief summary of your changes]
12 changes: 12 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
OpenBLAS ChangeLog
====================================================================
Version 0.2.8
01-Aug-2013
common:
* Support Open64 5.0. (#266)
* Add executable stack markings. (#262, Thank Sébastien Fabbro)
* Respect user's LDFLAGS (Thank Sébastien Fabbro)

x86/x86-64:
* Rollback bulldozer and piledriver kernels to barcelona kernels (#263)
We will fix the compuational error bug in bulldozer and piledriver kernels.

====================================================================
Version 0.2.7
20-Jul-2013
Expand Down
5 changes: 0 additions & 5 deletions Makefile.generic
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
COPT = -Wall -O2 # -DGEMMTEST
ifdef BINARY64
else
# LDFLAGS = -m elf32ppc
LDFLAGS = -m elf_i386
endif
11 changes: 0 additions & 11 deletions Makefile.power
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ endif
endif

ifdef BINARY64
ifeq ($(OSNAME), Linux)
LDFLAGS = -m elf64ppc
endif

ifeq ($(OSNAME), Darwin)
LDFLAGS = -arch ppc64
endif

ifeq ($(OSNAME), AIX)
CCOMMON_OPT += -mpowerpc64 -maix64
Expand All @@ -34,17 +28,12 @@ ifeq ($(COMPILER_F77), xlf)
FCOMMON_OPT += -q64
endif
ARFLAGS = -X 64
LDFLAGS = -b64
ASFLAGS = -a64
endif
else
ifeq ($(OSNAME), Linux)
LDFLAGS = -m elf32ppc
endif
ifeq ($(OSNAME), AIX)
CCOMMON_OPT += -Wa,-a32
ARFLAGS = -X 32
LDFLAGS = -b32
ASFLAGS = -a32
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion Makefile.rule
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# This library's version
VERSION = 0.2.7
VERSION = 0.2.8

# If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
# and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
Expand Down
1 change: 0 additions & 1 deletion Makefile.sparc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ endif
ifeq ($(COMPILER_F77), f90)
FCOMMON_OPT += -xarch=v9
endif
LDFLAGS = -64
else

CCOMMON_OPT += -mcpu=v9
Expand Down
7 changes: 5 additions & 2 deletions Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,16 @@ ifeq ($(ARCH), x86)
DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \
CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO
ifneq ($(NO_AVX), 1)
DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER
DYNAMIC_CORE += SANDYBRIDGE
#BULLDOZER PILEDRIVER
endif
endif

ifeq ($(ARCH), x86_64)
DYNAMIC_CORE = PRESCOTT CORE2 PENRYN DUNNINGTON NEHALEM OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO
ifneq ($(NO_AVX), 1)
DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER
DYNAMIC_CORE += SANDYBRIDGE
#BULLDOZER PILEDRIVER
endif
endif

Expand Down Expand Up @@ -895,6 +897,7 @@ export CC
export FC
export BU
export FU
export NEED2UNDERSCORES
export USE_THREAD
export NUM_THREADS
export NUM_CORES
Expand Down
3 changes: 0 additions & 3 deletions Makefile.x86
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# COMPILER_PREFIX = mingw32-

ifeq ($(OSNAME), Linux)
LDFLAGS = -melf_i386
endif

ifeq ($(OSNAME), Interix)
ARFLAGS = -m x86
Expand Down
13 changes: 0 additions & 13 deletions Makefile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@

ifeq ($(OSNAME), SunOS)
ifdef BINARY64
LDFLAGS = -64
ifeq ($(F_COMPILER), SUN)
FCOMMON_OPT += -m64
endif
endif
endif

ifeq ($(OSNAME), FreeBSD)
LDFLAGS = -m elf_x86_64_fbsd
endif

ifeq ($(OSNAME), Linux)
LDFLAGS = -m elf_x86_64
endif

ifeq ($(OSNAME), Darwin)
LDFLAGS =
endif

ifeq ($(OSNAME), Interix)
ARFLAGS = -m x64
endif
Expand Down
10 changes: 9 additions & 1 deletion common_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,17 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define PROFCODE .prologue 0
#endif

#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",%progbits
#else
#define GNUSTACK
#endif

#define EPILOGUE \
.end REALNAME; \
.ident VERSION
.ident VERSION; \
GNUSTACK

#endif

#ifdef DOUBLE
Expand Down
9 changes: 8 additions & 1 deletion common_ia64.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,15 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define PROFCODE
#endif

#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",%progbits
#else
#define GNUSTACK
#endif

#define EPILOGUE \
.endp REALNAME
.endp REALNAME ; \
GNUSTACK

#define START_ADDRESS 0x20000fc800000000UL

Expand Down
9 changes: 8 additions & 1 deletion common_mips64.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,17 @@ REALNAME: ;\
.set noreorder ;\
.set nomacro

#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",%progbits
#else
#define GNUSTACK
#endif

#define EPILOGUE \
.set macro ;\
.set reorder ;\
.end REALNAME
.end REALNAME ;\
GNUSTACK

#define PROFCODE
#endif
Expand Down
11 changes: 10 additions & 1 deletion common_sparc.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,17 @@ static __inline int blas_quickdivide(blasint x, blasint y){
.type REALNAME, #function; \
.proc 07; \
REALNAME:;

#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",%progbits
#else
#define GNUSTACK
#endif

#define EPILOGUE \
.size REALNAME, .-REALNAME
.size REALNAME, .-REALNAME; \
GNUSTACK

#endif

#endif
Expand Down
4 changes: 3 additions & 1 deletion common_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define PROFCODE
#endif

#define EPILOGUE .size REALNAME, .-REALNAME
#define EPILOGUE \
.size REALNAME, .-REALNAME; \
.section .note.GNU-stack,"",%progbits

#endif

Expand Down
5 changes: 4 additions & 1 deletion common_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define PROFCODE
#endif

#define EPILOGUE .size REALNAME, .-REALNAME
#define EPILOGUE \
.size REALNAME, .-REALNAME; \
.section .note.GNU-stack,"",%progbits


#endif

Expand Down
8 changes: 4 additions & 4 deletions cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
#define CORE_NANO 19
#define CORE_SANDYBRIDGE 20
#define CORE_BOBCAT 21
#define CORE_BULLDOZER 22
#define CORE_PILEDRIVER 23
#define CORE_BULLDOZER CORE_BARCELONA
#define CORE_PILEDRIVER CORE_BARCELONA
#define CORE_HASWELL CORE_SANDYBRIDGE

#define HAVE_SSE (1 << 0)
Expand Down Expand Up @@ -198,8 +198,8 @@ typedef struct {
#define CPUTYPE_NANO 43
#define CPUTYPE_SANDYBRIDGE 44
#define CPUTYPE_BOBCAT 45
#define CPUTYPE_BULLDOZER 46
#define CPUTYPE_PILEDRIVER 47
#define CPUTYPE_BULLDOZER CPUTYPE_BARCELONA
#define CPUTYPE_PILEDRIVER CPUTYPE_BARCELONA
// this define is because BLAS doesn't have haswell specific optimizations yet
#define CPUTYPE_HASWELL CPUTYPE_SANDYBRIDGE

Expand Down
2 changes: 1 addition & 1 deletion cpuid_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ int get_cputype(int gettype){
if ((ecx & (1 << 20)) != 0) feature |= HAVE_SSE4_2;
#ifndef NO_AVX
if (support_avx()) feature |= HAVE_AVX;
if ((ecx & (1 << 12)) != 0) feature |= HAVE_FMA3;
#endif
if ((ecx & (1 << 20)) != 0) feature |= HAVE_FMA3;

if (have_excpuid() >= 0x01) {
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
Expand Down
2 changes: 1 addition & 1 deletion ctest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ endif
clean ::
rm -f x*

FLDFLAGS = $(FFLAGS:-fPIC=)
FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
CEXTRALIB =

# Single real
Expand Down
8 changes: 5 additions & 3 deletions driver/others/dynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ extern gotoblas_t gotoblas_BARCELONA;
extern gotoblas_t gotoblas_BOBCAT;
#ifndef NO_AVX
extern gotoblas_t gotoblas_SANDYBRIDGE;
extern gotoblas_t gotoblas_BULLDOZER;
extern gotoblas_t gotoblas_PILEDRIVER;
//extern gotoblas_t gotoblas_BULLDOZER;
//extern gotoblas_t gotoblas_PILEDRIVER;
#else
//Use NEHALEM kernels for sandy bridge
#define gotoblas_SANDYBRIDGE gotoblas_NEHALEM
#endif

#define gotoblas_BULLDOZER gotoblas_BARCELONA
#define gotoblas_PILEDRIVER gotoblas_BARCELONA
#endif

//Use sandy bridge kernels for haswell.
#define gotoblas_HASWELL gotoblas_SANDYBRIDGE

Expand Down
3 changes: 2 additions & 1 deletion driver/others/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <dirent.h>
#include <dlfcn.h>
#include <unistd.h>
#include <string.h>

#define MAX_NODES 16
#define MAX_CPUS 256
Expand Down Expand Up @@ -315,7 +316,7 @@ static int numa_check(void) {
}

while ((dir = readdir(dp)) != NULL) {
if (*(unsigned int *) dir -> d_name == 0x065646f6eU) {
if (strncmp(dir->d_name, "node", 4)==0) {

node = atoi(&dir -> d_name[4]);

Expand Down
Loading

0 comments on commit 835293c

Please sign in to comment.