tewk / homebrew-julia

small repository to install julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

homebrew-julia

A small tap for the Homebrew project to install Julia. Installation instructions:

$ brew update
$ brew tap staticfloat/julia
$ brew install julia

Common Issues

If you are building Julia from source and you see errors about libgfortran.dylib, you most likely need to reinstall the latest gcc, openblas-julia, suite-sparse-julia and arpack-julia:

$ brew update
$ brew rm gcc openblas-julia suite-sparse-julia arpack-julia
$ brew install gcc openblas-julia suite-sparse-julia arpack-julia 

See this thread for technical details as to why gfortran dependencies require this treatment.

Building a bleeding-edge version of Julia

If you wish to test the newest development version of Julia, you can build with the --HEAD option:

$ brew install --HEAD julia

Note that to run the test suite you must also pass the --HEAD option to brew:

$ brew test -v --HEAD julia

Using OpenBLAS HEAD or specifying CPU targets

If you wish to test the newest development version of OpenBLAS with Julia, you can do so by manually unlinking OpenBLAS, and installing the HEAD version of the formula:

$ brew unlink openblas-julia
$ brew install openblas-julia --HEAD

This will install the latest develop branch of OpenBLAS. Julia will happily link against this new version, but unfortunately SuiteSparse will not, so we must recompile SuiteSparse and therefore Julia:

$ brew rm suite-sparse-julia julia
$ brew install julia

When installing OpenBLAS on that shiny new piece of hardware that just came out, note that OpenBLAS may not have the software available to autodetect your processor type. You can manually specify a CPU target architecture by specifying --target when building OpenBLAS. For instance, to specify the Sandybridge archiceture (a good fallback for most modern macs):

$ brew install openblas-julia --target=SANDYBRIDGE

Providing your own userimg.jl

When building Julia, the file base/userimg.jl, if it exists, will be included in the cached of compiled code. If there are large libraries that you use often, it can be useful to require those in this file, for example:

require("Gtk")
require("DataFrames")
require("JuMP")

By default, the userimg.jl file does not exist, but you can provide it yourself, using the --userimg option (using reinstall rather than install if Julia is already installed):

$ brew install julia --userimg=$HOME/julia/myuserimg.jl

The file will then be copied and renamed before the main build, potentially leading to significant speedups when loading the specified modules.

Upgrading Julia

To upgrade Julia, remove and reinstall (Typically you will be doing this when living on the latest development version, so we have included all --HEAD commands here):

$ brew rm julia
$ brew install --HEAD julia

Run tests after upgrading to make sure everything is functioning as expected. Even when Julia is able to build, the tests might still fail due to dependencies.

$ brew test -v --HEAD julia

If compilation of Julia fails, or the tests fail, you may have to remove these dependencies and recompile:

$ brew rm julia arpack-julia suite-sparse-julia openblas-julia
$ brew install -v --HEAD julia && brew test -v --HEAD julia

This procedure is necessary after upgrading gcc, as the location of the gfortran libraries changes.

About

small repository to install julia


Languages

Language:Ruby 100.0%