Skip to content

Commit

Permalink
Merge branch 'local_blas' of github.com:JuliaLang/julia
Browse files Browse the repository at this point in the history
Conflicts:
	Make.inc
	deps/Makefile
	src/Makefile
	ui/Makefile
  • Loading branch information
Viral B. Shah committed Apr 30, 2012
2 parents 3444cbe + 01939cc commit 4c728cb
Show file tree
Hide file tree
Showing 475 changed files with 316 additions and 259 deletions.
36 changes: 26 additions & 10 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
JULIA_VERSION = $(shell cat $(JULIAHOME)/VERSION)
JULIA_COMMIT = $(shell git rev-parse --short=10 HEAD)

JULIALIB = $(JULIAHOME)/lib
EXTROOT = $(JULIAHOME)/external/root
EXTROOTLIB = $(JULIAHOME)/lib
EXT = $(JULIAHOME)/deps
EXTROOT = $(JULIAHOME)/deps/root
EXTROOTLIB = $(EXTROOT)/lib
LLVMROOT = $(EXTROOT)

Expand Down Expand Up @@ -91,7 +92,7 @@ endif
ifeq ($(USE_SYSTEM_LIBUNWIND), 1)
LIBUNWIND=-lunwind-generic -lunwind
else
LIBUNWIND=$(EXTROOT)/lib/libunwind-generic.a $(EXTROOT)/lib/libunwind.a
LIBUNWIND=$(EXTROOTLIB)/libunwind-generic.a $(EXTROOTLIB)/libunwind.a
endif

ifeq ($(USE_SYSTEM_LLVM), 1)
Expand Down Expand Up @@ -126,9 +127,9 @@ LIBBLAS = -lblas
endif
else
ifeq ($(OS), WINNT)
LIBBLAS = $(JULIAHOME)/external/openblas-$(OPENBLAS_VER)/libopenblas.lib
LIBBLAS = $(EXT)/openblas-$(OPENBLAS_VER)/libopenblas.lib
else
LIBBLAS = $(JULIAHOME)/external/openblas-$(OPENBLAS_VER)/libopenblas.a
LIBBLAS = -L$(EXTROOTLIB) -lopenblas
endif
endif

Expand All @@ -139,39 +140,53 @@ else
LIBLAPACK = -llapack
endif
else
LIBLAPACK = $(JULIAHOME)/external/lapack-$(LAPACK_VER)/liblapack.a
LIBLAPACK = -L$(EXTROOTLIB) -lopenblas
endif

# OS specific stuff

ifeq ($(OS), Linux)
SHLIB_EXT = so
JLDFLAGS = -Xlinker -rpath $(JULIAHOME)/lib
RPATH = -Wl,-rpath,'$$ORIGIN/lib'
OSLIBS += -ldl -lrt -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap $(LIBUNWIND)
WHOLE_ARCHIVE = -Wl,--whole-archive
NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
endif

ifeq ($(OS), FreeBSD)
SHLIB_EXT = so
JLDFLAGS = -Xlinker -rpath $(JULIAHOME)/lib
OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap -lutil -lm $(LIBUNWIND)
RPATH = -Wl,-rpath,'$$ORIGIN/lib'
WHOLE_ARCHIVE = -Wl,--whole-archive
NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
endif

ifeq ($(OS), Darwin)
SHLIB_EXT = dylib
JLDFLAGS =
OSLIBS += -ldl -Wl,-w -framework ApplicationServices -lutil -lm
RPATH =
OSLIBS += -ldl -Wl,-w -framework ApplicationServices
WHOLE_ARCHIVE = -Xlinker -all_load
NO_WHOLE_ARCHIVE =
endif

ifeq ($(OS), WINNT)
SHLIB_EXT = dll
RPATH =
OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap -L"F:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" -lntdll -lkernel32 -lWs2_32 -lIphlpapi
WHOLE_ARCHIVE =
NO_WHOLE_ARCHIVE =
endif

# Libraries to link
LIBS = $(shell $(LLVM_CONFIG) --libfiles) $(JULIAHOME)/src/flisp/libflisp.a $(JULIAHOME)/src/support/libsupport.a -L$(EXTROOT)/lib $(EXTROOTLIB)/uv.a $(OSLIBS) -lpthread $(shell $(LLVM_CONFIG) --ldflags)

endif

# Colors for make

USE_QUIET = 1

ifeq ($(USE_QUIET), 1)
CCCOLOR="\033[34m"
LINKCOLOR="\033[34;1m"
PERLCOLOR="\033[35m"
Expand All @@ -190,3 +205,4 @@ QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$(GOAL
QUIET_PERL = @printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR);
QUIET_FLISP = @printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR);
QUIET_JULIA = @printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR);
endif
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debug release: makelinks
@$(MAKE) -s sys.ji

julia-debug julia-release:
@$(MAKE) -sC external
@$(MAKE) -sC deps
@$(MAKE) -sC src lib$@
@$(MAKE) -sC base
@$(MAKE) -sC ui $@
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ You can read about [getting started](http:https://julialang.org/manual/getting-started
<a name="Platform-Specific-Notes"/>
### Platform-Specific Notes

On some Linux distributions (for instance Ubuntu 11.10) you may need to change how the readline library is linked. If you get a build error involving readline, try changing the value of `USE_SYSTEM_READLINE` in `Make.inc` to `1`.
On some Linux distributions you may need to change how the readline library is linked. If you get a build error involving readline, try changing the value of `USE_SYSTEM_READLINE` in `Make.inc` to `1`.

On Ubuntu, you may also need to install the package `libncurses5-dev`.

If OpenBLAS fails to build in `getarch_2nd.c`, you need to specify the architecture of your processor in Make.inc.

On OS X, you may need to install `gfortran`. Either download and install [gfortran from hpc.sf.net](http:https://hpc.sf.net/), or [64-bit gfortran from gcc.gnu.org](http:https://gcc.gnu.org/wiki/GFortranBinaries).

If you get link errors mentioning `gfortran`, it might help to put `/usr/local/gfortran/lib` at the beginning of the `DYLD_LIBRARY_PATH` environment variable.
Expand Down Expand Up @@ -150,7 +148,7 @@ Julia uses the following external libraries, which are automatically downloaded
base/ source code for julia's standard library
contrib/ emacs and textmate support for julia
examples/ example julia programs
external/ external dependencies
deps/ external dependencies
extras/ useful optional libraries
lib/ shared libraries loaded by julia's standard libraries
src/ source for julia language core
Expand Down Expand Up @@ -201,7 +199,7 @@ On Linux systems, the `Shift-Enter` binding can be set by placing the following

Julia has a web REPL with very preliminary graphics capabilities.
Follow these instructions for setting up the web repl locally.
In external, doing `make install-lighttpd` will download and build lighttpd.
In deps, doing `make install-lighttpd` will download and build lighttpd.
Use the launch-webserver script to start the webserver and web-repl.
Point your browser to `http:https://localhost:2000/`.
Try `plot(cumsum(randn(1000)))`
Expand Down
2 changes: 1 addition & 1 deletion base/linalg_blas.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_jl_libblas = dlopen("liblapack")
_jl_libblas = dlopen("libopenblas")

# SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
for (fname, elty) in ((:dcopy_,:Float64), (:scopy_,:Float32),
Expand Down
2 changes: 1 addition & 1 deletion base/start_image.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _jl_libfdm = dlopen("libfdm")
_jl_librandom = dlopen("librandom"); _jl_librandom_init();

# Optional libraries
_jl_libblas = dlopen("liblapack")
_jl_libblas = dlopen("libopenblas")
_jl_liblapack = _jl_libblas
_jl_libfftw = dlopen("libfftw3")
_jl_libfftwf = dlopen("libfftw3f")
Expand Down
2 changes: 2 additions & 0 deletions external/.gitignore → deps/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
/SuiteSparse-*
/double-conversion-*
/gmp-*
/glpk-*
/readline62-*
File renamed without changes.
Loading

2 comments on commit 4c728cb

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh-huh-huh. Smooth move :-P

Should we just go with it?

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented on 4c728cb Apr 30, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.