Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JuliaLang/julia
Browse files Browse the repository at this point in the history
* 'master' of github.com:JuliaLang/julia:
  Working sparse \
  small fix to suitesparse build.
  Build SuiteSparse. Still need to resolve LAPACK symbols.
  Use lu! for economy mode. No economy argument to lu any more. lu is implemented using lu! Close JuliaLang#272.
  Specialize the conversion for integer arrays as the real case led to stack overflow in the earlier commit.
  Promote all non-float arrays to float for lapack function calls (both real and complex cases) Fix bug in calling complex qr close JuliaLang#134
  ode23 is quite decent. ode45 seems ok, but may need some code cleanup and performance testing. Both need a few more function signatures - but good enough to get started.
  Implement select(k) using quickselect Separate stats stuff into statistics.j Implement median using select
  Almost working quickselect that will pave the way for median and order statistics.
  • Loading branch information
StefanKarpinski committed Dec 25, 2011
2 parents 3140514 + 64f2f8e commit 2e6b9f5
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 288 deletions.
223 changes: 0 additions & 223 deletions examples/brian_drawert/param_search.m

This file was deleted.

76 changes: 54 additions & 22 deletions external/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ OPENBLAS_VER = v0.1alpha2.4
LAPACK_VER = 3.4.0
ARPACK_VER = 96
FFTW_VER = 3.3
SUITESPARSE_VER = 3.7.0
CLP_VER = 1.14.5
UNWIND_VER = 0.99
LIGHTTPD_VER = 1.4.29
Expand Down Expand Up @@ -301,34 +302,36 @@ clean-fftw-double:
distclean-fftw:
rm -rf fftw-$(FFTW_VER).tar.gz fftw-$(FFTW_VER)-{single,double}

## UNWIND ##

LIBUNWIND_TARGET_OBJ = $(EXTROOTLIB)/libunwind.a
LIBUNWIND_TARGET_SOURCE = $(JULIAHOME)/external/libunwind-$(UNWIND_VER)/Makefile
## SUITESPARSE ##

compile-unwind: $(LIBUNWIND_TARGET_SOURCE)
install-unwind: $(LIBUNWIND_TARGET_OBJ)
SUITESPARSE_OBJ_TARGET = $(EXTROOTLIB)/libSuiteSparse.$(SHLIB_EXT)

$(LIBUNWIND_TARGET_OBJ): $(LIBUNWIND_TARGET_SOURCE)
cd libunwind-$(UNWIND_VER) && $(MAKE) && $(MAKE) install
compile-suitesparse: install-suitesparse
install-suitesparse: $(SUITESPARSE_OBJ_TARGET)


libunwind-$(UNWIND_VER).tar.gz:
curl -O http://savannah.spinellicreations.com/libunwind/libunwind-$(UNWIND_VER).tar.gz

open-unwind: libunwind-$(UNWIND_VER).tar.gz
tar xvfz $<
SuiteSparse-$(SUITESPARSE_VER).tar.gz:
curl http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-$(SUITESPARSE_VER).tar.gz > $@
SuiteSparse-$(SUITESPARSE_VER)/Makefile: SuiteSparse-$(SUITESPARSE_VER).tar.gz
mkdir -p SuiteSparse-$(SUITESPARSE_VER)
tar -C SuiteSparse-$(SUITESPARSE_VER) --strip-components 1 -zxf SuiteSparse-$(SUITESPARSE_VER).tar.gz
touch $@
$(SUITESPARSE_OBJ_TARGET): SuiteSparse-$(SUITESPARSE_VER)/Makefile
cd SuiteSparse-$(SUITESPARSE_VER) && \
$(MAKE) && \
mkdir -p lib && \
cp `find UMFPACK CHOLMOD *AMD BTF -name *.a` lib && cd lib && \
for i in *.a; do ar x $$i; done && \
gcc -shared -fPIC *.o -o libSuiteSparse.$(SHLIB_EXT) $(EXTROOTLIB)/libLAPACK.$(SHLIB_EXT) && \
cp libSuiteSparse.$(SHLIB_EXT) $(EXTROOTLIB)
touch $@

$(LIBUNWIND_TARGET_SOURCE): open-unwind
cd libunwind-$(UNWIND_VER) && ./configure CFLAGS="-U_FORTIFY_SOURCE -fPIC" --prefix=$(EXTROOT)

clean-unwind:
$(MAKE) -C libunwind-$(UNWIND_VER) clean
rm -rf $(LIBUNWIND_TARGET_OBJ) $(LIBUNWIND_TARGET_SOURCE)

distclean-unwind:
rm -rf libunwind-$(UNWIND_VER).tar.gz libunwind-$(UNWIND_VER)
clean-suitesparse:
rm -fr SuiteSparse-$(SUITESPARSE_VER)/lib
$(MAKE) -C SuiteSparse-$(SUITESPARSE_VER) clean
rm -f $(SUITESPARSE_OBJ_TARGET)
distclean-suitesparse:
rm -rf SuiteSparse-$(SUITESPARSE_VER).tar.gz SuiteSparse-$(SUITESPARSE_VER) $(SUITESPARSE_OBJ_TARGET)

## CLP ##

Expand All @@ -355,6 +358,35 @@ clean-clp:
distclean-clp:
rm -rf Clp-$(CLP_VER).tar.bz2 Clp-$(CLP_VER)

## UNWIND ##

LIBUNWIND_TARGET_OBJ = $(EXTROOTLIB)/libunwind.a
LIBUNWIND_TARGET_SOURCE = $(JULIAHOME)/external/libunwind-$(UNWIND_VER)/Makefile

compile-unwind: $(LIBUNWIND_TARGET_SOURCE)
install-unwind: $(LIBUNWIND_TARGET_OBJ)

$(LIBUNWIND_TARGET_OBJ): $(LIBUNWIND_TARGET_SOURCE)
cd libunwind-$(UNWIND_VER) && $(MAKE) && $(MAKE) install


libunwind-$(UNWIND_VER).tar.gz:
curl -O http://savannah.spinellicreations.com/libunwind/libunwind-$(UNWIND_VER).tar.gz

open-unwind: libunwind-$(UNWIND_VER).tar.gz
tar xvfz $<
touch $@

$(LIBUNWIND_TARGET_SOURCE): open-unwind
cd libunwind-$(UNWIND_VER) && ./configure CFLAGS="-U_FORTIFY_SOURCE -fPIC" --prefix=$(EXTROOT)

clean-unwind:
$(MAKE) -C libunwind-$(UNWIND_VER) clean
rm -rf $(LIBUNWIND_TARGET_OBJ) $(LIBUNWIND_TARGET_SOURCE)

distclean-unwind:
rm -rf libunwind-$(UNWIND_VER).tar.gz libunwind-$(UNWIND_VER)

## GNU LIGHTTPD ##

LIGHTTPD_OBJ_TARGET = $(EXTROOT)/sbin/lighttpd
Expand Down
12 changes: 0 additions & 12 deletions j/linalg.j
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,6 @@ function trace{T}(A::Matrix{T})
return t
end

mean(V::Vector) = sum(V) / length(V)

function std(V::Vector)
n = numel(V)
m = mean(V)
s = 0.0
for i=1:n
s += (V[i] - m)^2
end
return sqrt(s/(n-1))
end

kron(a::Vector, b::Vector) = [ a[i]*b[j] | i=1:length(a), j=1:length(b) ]

function kron{T,S}(a::Matrix{T}, b::Matrix{S})
Expand Down
Loading

0 comments on commit 2e6b9f5

Please sign in to comment.