The easiest piece of the whole puzzle is:

• fortran universal binary

http://r.research.att.com/gfortran-4.2.3.dmg

It's simple. All files go into

`/usr/local`

.It's 32-bit, but that doesn't matter, right?

While the gfortran binary itself is i386/ppc, it does create i386/x86_64 binaries just fine...to have gfortran build a 64-bit binary, pass it the flag "-m64".

A second dependency we can deal with easily is FFTW

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions...Our benchmarks, performed on on a variety of platforms, show that FFTW's performance is typically superior to that of other publicly available FFT software, and is even competitive with vendor-tuned codes. In contrast to vendor-tuned codes, however, FFTW's performance is portable: the same program will perform well on most architectures without modification. Hence the name, "FFTW," which stands for the somewhat whimsical title of "Fastest Fourier Transform in the West."

According to hyperjeff, it's important to pass configure some info about what we want:

If you want to know how FFTW works, there is some very high-class documentation included. It takes a bit to build.

Next up is some complexity that we are going to ignore for now. I'll put my notes here in case I change my mind later, but I decided not to bother with this for the moment.

According to hyperjeff, we need to install UMFPACK and its friends AMD an UFconfig. However, I think UMFPACK is not actually "required." It's not mentioned in the install from source notes for SciPy on OS X.

I have a note that these are listed as required in the SciPy instructions, but I'm not sure where I got that at the moment.

• UMFPACK ("Umph Pack") is a set of routines for solving unsymmetric sparse linear systems

• AMD is a set of routines for ordering a sparse matrix prior to Cholesky factorization

• UFconfig is required by nearly all sparse matrix packages

UMFPACK depends on AMD and both depend on UFconfig. These also somehow use BLAS/LAPACK.

• BLAS (Basic Linear Algebra Subprograms)

• LAPACK

which in turn have something to do with ATLAS

Got that? But it shouldn't be that hard. Just follow the instructions. Download the packages, change a line here to point to the correct fortran compiler, a line there to change some flags for the gcc compiler, and tell it that BLAS and LAPACK depend on the Accelerate framework, copy all the files and make (no install?).

What is the "Accelerate" framework on OS X? According to these Apple docs:

the Accelerate framework includes the vImage image processing framework, the vDSP digital signal processing framework, and the LAPACK and BLAS libraries for Linear Algebra, among others.

That explains why we didn't need to install them. Other notes here, from which hyperjeff developed his instructions.

OK. All that remains is Numpy and Scipy!

## 3 comments:

Have you ever taken a look at Scipy Superpack ?

It's a nice script/package that installs 64 bit versions of NumPy, SciPy, Matplotlib, IPython and PyMC for 10.6. It even optionally downloads and installs gFortran 4.2...

Pretty neat :)

Whops. Didn't notice this post of yours. ;)

My fault, that's what I get for not checking your blog daily, and for not reading the post in chronological order :D

It's great to hear from you. Glad someone is reading.

Post a Comment