@@ -4,6 +4,8 @@ Version 0.1 (in development) | |||
26-Feb-2011 | |||
common: | |||
* Support "make NO_LAPACK=1" to build the library without | |||
LAPACK functions. | |||
* Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34. | |||
Thank Mr.Ei-ji Nakama providing this patch. (Refs issue #12 on github) | |||
* Added DEBUG=1 rule in Makefile.rule to build debug version. | |||
@@ -15,7 +15,10 @@ ifdef SANITY_CHECK | |||
BLASDIRS += reference | |||
endif | |||
SUBDIRS = $(BLASDIRS) lapack | |||
SUBDIRS = $(BLASDIRS) | |||
ifneq ($(NO_LAPACK), 1) | |||
SUBDIRS += lapack | |||
endif | |||
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench | |||
@@ -149,10 +152,15 @@ hpl_p : | |||
fi; \ | |||
done | |||
ifeq ($(NO_LAPACK), 1) | |||
netlib : | |||
else | |||
netlib : lapack-3.1.1 patch.for_lapack-3.1.1 lapack-3.1.1/make.inc | |||
ifndef NOFORTRAN | |||
-@$(MAKE) -C lapack-3.1.1 lapacklib | |||
endif | |||
endif | |||
prof_lapack : lapack-3.1.1 lapack-3.1.1/make.inc | |||
-@$(MAKE) -C lapack-3.1.1 lapack_prof | |||
@@ -43,6 +43,9 @@ VERSION = 0.1 | |||
# If you don't need CBLAS interface, please comment it in. | |||
# NO_CBLAS = 1 | |||
# If you don't need LAPACK, please comment it in. | |||
# NO_LAPACK = 1 | |||
# If you want to use legacy threaded Level 3 implementation. | |||
# USE_SIMPLE_THREADED_LEVEL3 = 1 | |||
@@ -75,13 +75,13 @@ libgoto2_shared.dll : ../$(LIBNAME) libgoto2_shared.def | |||
-Wl,--out-implib,libgoto2_shared.lib $(FEXTRALIB) | |||
libgoto2.def : gensymbol | |||
perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
libgoto2_shared.def : gensymbol | |||
perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
libgoto_hpl.def : gensymbol | |||
perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
$(LIBDYNNAME) : ../$(LIBNAME) osx.def | |||
$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o $(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) | |||
@@ -162,23 +162,23 @@ static : ../$(LIBNAME) | |||
rm -f goto.$(SUFFIX) | |||
linux.def : gensymbol ../Makefile.system ../getarch.c | |||
perl ./gensymbol linux $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol linux $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
osx.def : gensymbol ../Makefile.system ../getarch.c | |||
perl ./gensymbol osx $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol osx $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
aix.def : gensymbol ../Makefile.system ../getarch.c | |||
perl ./gensymbol aix $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) > $(@F) | |||
perl ./gensymbol aix $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > $(@F) | |||
symbol.S : gensymbol | |||
perl ./gensymbol win2kasm noarch dummy $(EXPRECISION) $(NO_CBLAS) > symbol.S | |||
perl ./gensymbol win2kasm noarch dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > symbol.S | |||
test : linktest.c | |||
$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) -lm && echo OK. | |||
rm -f linktest | |||
linktest.c : gensymbol ../Makefile.system ../getarch.c | |||
perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) > linktest.c | |||
perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) > linktest.c | |||
clean :: | |||
@rm -f *.def *.dylib __.SYMDEF* | |||
@@ -298,7 +298,10 @@ | |||
zcgesv, zlag2c, clag2z, | |||
); | |||
if (-d "../lapack-3.1.1") { | |||
if ($ARGV[5] == 1) { | |||
#NO_LAPACK=1 | |||
@objs = (@blasobjs); | |||
} elsif (-d "../lapack-3.1.1") { | |||
@objs = (@blasobjs, @lapackobjs, @lapackobjs2); | |||
} else { | |||
@objs = (@blasobjs, @lapackobjs); | |||
@@ -342,36 +342,45 @@ CBLASOBJS = $(CBLAS1OBJS) $(CBLAS2OBJS) $(CBLAS3OBJS) | |||
ZBLASOBJS = $(ZBLAS1OBJS) $(ZBLAS2OBJS) $(ZBLAS3OBJS) | |||
XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS) | |||
SBLASOBJS += \ | |||
SLAPACKOBJS = \ | |||
sgetf2.$(SUFFIX) sgetrf.$(SUFFIX) slauu2.$(SUFFIX) slauum.$(SUFFIX) \ | |||
spotf2.$(SUFFIX) spotrf.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) \ | |||
slaswp.$(SUFFIX) sgetrs.$(SUFFIX) sgesv.$(SUFFIX) spotri.$(SUFFIX) \ | |||
DBLASOBJS += \ | |||
DLAPACKOBJS = \ | |||
dgetf2.$(SUFFIX) dgetrf.$(SUFFIX) dlauu2.$(SUFFIX) dlauum.$(SUFFIX) \ | |||
dpotf2.$(SUFFIX) dpotrf.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) \ | |||
dlaswp.$(SUFFIX) dgetrs.$(SUFFIX) dgesv.$(SUFFIX) dpotri.$(SUFFIX) \ | |||
QBLASOBJS += \ | |||
QLAPACKOBJS = \ | |||
qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \ | |||
qpotf2.$(SUFFIX) qpotrf.$(SUFFIX) qtrti2.$(SUFFIX) qtrtri.$(SUFFIX) \ | |||
qlaswp.$(SUFFIX) qgetrs.$(SUFFIX) qgesv.$(SUFFIX) qpotri.$(SUFFIX) \ | |||
CBLASOBJS += \ | |||
CLAPACKOBJS = \ | |||
cgetf2.$(SUFFIX) cgetrf.$(SUFFIX) clauu2.$(SUFFIX) clauum.$(SUFFIX) \ | |||
cpotf2.$(SUFFIX) cpotrf.$(SUFFIX) ctrti2.$(SUFFIX) ctrtri.$(SUFFIX) \ | |||
claswp.$(SUFFIX) cgetrs.$(SUFFIX) cgesv.$(SUFFIX) cpotri.$(SUFFIX) \ | |||
ZBLASOBJS += \ | |||
ZLAPACKOBJS = \ | |||
zgetf2.$(SUFFIX) zgetrf.$(SUFFIX) zlauu2.$(SUFFIX) zlauum.$(SUFFIX) \ | |||
zpotf2.$(SUFFIX) zpotrf.$(SUFFIX) ztrti2.$(SUFFIX) ztrtri.$(SUFFIX) \ | |||
zlaswp.$(SUFFIX) zgetrs.$(SUFFIX) zgesv.$(SUFFIX) zpotri.$(SUFFIX) \ | |||
XBLASOBJS += \ | |||
XLAPACKOBJS = \ | |||
xgetf2.$(SUFFIX) xgetrf.$(SUFFIX) xlauu2.$(SUFFIX) xlauum.$(SUFFIX) \ | |||
xpotf2.$(SUFFIX) xpotrf.$(SUFFIX) xtrti2.$(SUFFIX) xtrtri.$(SUFFIX) \ | |||
xlaswp.$(SUFFIX) xgetrs.$(SUFFIX) xgesv.$(SUFFIX) xpotri.$(SUFFIX) \ | |||
ifneq ($(NO_LAPACK), 1) | |||
SBLASOBJS += $(SLAPACKOBJS) | |||
DBLASOBJS += $(DLAPACKOBJS) | |||
QBLASOBJS += $(QLAPACKOBJS) | |||
CBLASOBJS += $(CLAPACKOBJS) | |||
ZBLASOBJS += $(ZLAPACKOBJS) | |||
XBLASOBJS += $(XLAPACKOBJS) | |||
endif | |||
FUNCOBJS = $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) | |||
@@ -1,3 +1,4 @@ | |||
ifneq ($(NO_LAPACK), 1) | |||
SBLASOBJS += sneg_tcopy$(TSUFFIX).$(SUFFIX) slaswp_ncopy$(TSUFFIX).$(SUFFIX) | |||
DBLASOBJS += dneg_tcopy$(TSUFFIX).$(SUFFIX) dlaswp_ncopy$(TSUFFIX).$(SUFFIX) | |||
@@ -10,6 +11,8 @@ ZBLASOBJS += zneg_tcopy$(TSUFFIX).$(SUFFIX) zlaswp_ncopy$(TSUFFIX).$(SUFFIX) | |||
XBLASOBJS += xneg_tcopy$(TSUFFIX).$(SUFFIX) xlaswp_ncopy$(TSUFFIX).$(SUFFIX) | |||
endif | |||
$(KDIR)sneg_tcopy$(TSUFFIX).$(SUFFIX) $(KDIR)sneg_tcopy$(TSUFFIX).$(PSUFFIX) : generic/neg_tcopy_$(SGEMM_UNROLL_M).c | |||
$(CC) -c $(CFLAGS) $< -o $@ | |||