Skip to content

Instantly share code, notes, and snippets.

@ikegami-yukino
Last active October 19, 2015 08:03
Show Gist options
  • Save ikegami-yukino/f71ed0b50c28dff4e0f9 to your computer and use it in GitHub Desktop.
Save ikegami-yukino/f71ed0b50c28dff4e0f9 to your computer and use it in GitHub Desktop.
pushd .
# Install blas
cd /tmp
wget http://www.netlib.org/blas/blas.tgz
tar xzf blas.tgz
cd BLAS*
gfortran -O3 -m64 -fPIC -c *.f
ar r libfblas.a *.o
ranlib libfblas.a
rm -rf *.o
cp libfblas.a /usr/local/lib
gfortran -O3 -m64 -fPIC -shared *.f -o libfblas.so
cp libfblas.so /usr/local/lib
export BLAS=/usr/local/lib/libfblas.so
# OpenBLAS
brew tap homebrew/science
brew install homebrew/science/openblas
# Install lapack
cd /tmp
wget http://www.netlib.org/lapack/lapack.tgz
tar xzf lapack.tgz
cd lapack-*
cp INSTALL/make.inc.gfortran make.inc
vi make.inc
OPTS = -O2 -m64 -fPIC
NOOPT = -m64 -fPIC
make lapacklib
cp liblapack.a /usr/local/lib
export LAPACK=/usr/local/lib/liblapack.a
# ATLAS
wget http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2
tar -xzf atlas3.10.2.tar.bz2
cd ATLAS/
mkdir _mac_build
cd _mac_build
../configure
make
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment