Installing Lapack On Mac Os X

Mac doesn’t have a preinstalled package manager, but there are a couple of popular package managers you can install. For Python 3.5 with Macports, execute this command in a terminal: sudo port install py35 - numpy py35 - scipy py35 - matplotlib py35 - ipython + notebook py35 - pandas py35 - sympy py35 - nose. Note on MacOS X, you can use the accelerate framework (ATLAS for Mac) To link, just use: '-framework Accelerate? Hope it helps Julie On Jul 28, 2015, at 9:36 AM, Maksims Abalenkovs wrote: Dear Madam or Sir, I?m experiencing a problem trying to install ScaLAPACK onto Mac OS X using the Python installer script (1.0.2). If the BLAS and LAPACK shared and/or static libraries are installed, there should be no further problems following the installation instructions below. Mac OS X A binary can be built for Mac using Apple's optimized versions of the BLAS and LAPACK libraries, which are contained in the 'vecLib' sub-framework, part of the 'Accelerate' framework. On Mac OS X (version 10.3 or later) LAPACK is built-in, but on other platforms, the C port of LAPACK, called CLAPACK, must be installed for PHAST to be fully functional. Install PHAST using Binaries Compiling PHAST from Source. On Ubuntu, such libraries can be made available by installing liblapack-dev. Other Linux distributions typically also offer a way to install Blas and Lapack via its package manager. On Mac OS X, Ipopt's build system should pick up the Blas and Lapack from the Accelerate framework.

Rather than downloading and installing this software, you might want toconsider using the Virtual Machine for this class, which already contains everything you need.Or, you can do your computing on the cloud by following the instructions inthe section Amazon Web Services EC2 AMI.

It is assumed that you are on a Unix-like machine (e.g Linux or Mac OSX). For some flavors of Unix it is easy to download and install someof the required packages using apt-get (see Software available through apt-get),or your system’s packagemanager. Many Python packages can also be installed usingeasy_install (see Software available through easy_install).

If you must use a Windows PC, then you shoulddownload and install [VirtualBox] for Windows and thenrun the Virtual Machine for this class to provide a Linux environment. Alternatively you can usea linux machine in the cloud via Amazon Web Services EC2 AMI.

If you are using a Mac and want to install the necessary software, you alsoneed to install Xcode developertools, which includes necessary compilers and make, for example.

Some of this software may already be available on your machine. The whichcommand in Unix will tell you if a command is found on your search path,e.g.:

tells me that when I type the python command it runs the program located inthe file listed. Often executables are stored in directories named bin,which is short for binary, since they are often binary machine code files.

If which doesn’t print anything, or says something like:

then the command cannot be found on the search path. So either thesoftware is not installed or it has been installed in a directory that isn’tsearched by the shell program (see Shells) when it tries to interpretyour command. See PATH and other search paths for more information.

Versions¶

Often there is more than one version of software packages in use. Newerversions may have more features than older versions and perhaps even behavedifferently with respect to common features. For some of what we do it willbe important to have a version that is sufficiently current.

For example, Python has changed dramatically in recent years. Everything weneed (I think!) for this class can be found inVersion 2.X.Y for any (X geq 4).

Major changes were made to Python in going to Python 3.0, which has not beenbroadly adopted by the community yet (because much code would have to berewritten). In this class we are not using Python 3.X. (See[Python-3.0-tutorial] for more information.)

To determine what version of softwareyou have installed, often the command can be issued with the --versionflag, e.g.:

Individual packages¶

Installing lapack on mac os x 10.7

Python¶

Installing Lapack On Mac Os X

If the version of Python on your computer is older than 2.7.0 (see above),you should upgrade.

See http://www.python.org/download/ or consider the Enthought PythonDistribution (EPD) or Anaconda CE described below.

SciPy Superpack¶

On Mac OSX, you can often install gfortran and all the Python packages we’llneed using the SciPy Superpack.

Enthought Python Distribution (EPD)¶

You might consider installingEPD free

This includes a recent version of Python 2.X as well as many of the otherPython packages listed below (IPython, NumPy, SciPy, matplotlib, mayavi).

EPD works well on Windows machines too.

Anaconda CE¶

Anacondais a new collection of Python tools distributed byContinuum AnalyticsThe “community edition” Anaconda CE is free and contains most of the toolswe’ll be using, including IPython, NumPy, SciPy, matplotlib,and many others. The full Anaconda is also free for academic users.

IPython¶

The IPython shell is much nicer to use than the standard Python shell (seeShells and ipython).(Included in EPD, Anaconda, and the SciPy Superpack.)

See http://ipython.scipy.org/moin/

NumPy and SciPy¶

Used for numerical computing in Python (see Numerics in Python).(Included in EPD, Anaconda, and the SciPy Superpack.)

See http://www.scipy.org/Installing_SciPy

Matplotlib¶

Matlab-like plotting package for 1d and 2d plots in Python.(Included in EPD, Anaconda, and the SciPy Superpack.)

See http://matplotlib.sourceforge.net/

Git¶

Version control system (see Git).

See downloads.

Sphinx¶

Documentation system used to create these class notes pages (seeSphinx documentation).

See http://sphinx.pocoo.org/

gfortran¶

GNU fortran compiler (see Fortran).

You may already have this installed, try:

See http://gcc.gnu.org/wiki/GFortran

OpenMP¶

Included with gfortran (see OpenMP).

Open MPI¶

Message Passing Interface software for parallel computing (see MPI).

See http://www.open-mpi.org/

Some instructions for installing from source on a Mac can be found athere.

LAPack¶

Linear Algebra Package, a standard library of highly optimized linearalgebra subroutines. LAPack depends on the BLAS (Basic Linear AlgebraSubroutines); it is distributed with a reference BLAS implementation,but more highly optimized BLAS are available for most systems.

See http://www.netlib.org/lapack/

Software available through apt-get

On a recent Debian or Ubuntu Linux system, most of the software forthis class can be installed through apt-get. To install, type thecommand:

where the appropriate PACKAGE to install comes from the list below.

NOTE: You will only be able to do this on your own machine, the VM describedat Virtual Machine for this class, or a computer on which you have super user privileges toinstall software in the sytsem files. (See sudo)

You can also installthese packages using a graphical package manager such as Synapticinstead of apt-get. If you are able to install all of thesepackages, you do not need to install the Enthought PythonDistribution.

SoftwarePackage
Pythonpython
IPythonipython
NumPypython-numpy
SciPypython-scipy
Matplotlibpython-matplotlib
Python development filespython-dev
Gitgit
Sphinxpython-sphinx
gfortrangfortran
OpenMPI librarieslibopenmpi-dev
OpenMPI executablesopenmpi-bin
LAPackliblapack-dev

Many of these packages depend on other packages; answer “yes” whenapt-get asks you if you want to download them. Some of them, suchas Python, are probably already installed on your system, in whichcase apt-get will tell you that they are already installed and donothing.

The script below was used to install software on the Ubuntu VM:

Software available through easy_install

easy_install is a Python utility that can automatically download andinstall many Python packages. It is part of the Python setuptoolspackage, available from http://pypi.python.org/pypi/setuptools,and requires Python to already be installed on your system. Once thispackage is installed, you can install Python packages on a Unix systemby typing:

where the PACKAGE to install comes from the list below. Note thatthese packages are redundant with the ones available from apt-get;use apt-get if it’s available.

SoftwarePackage
IPythonIPython[kernel,security]
NumPynumpy
SciPyscipy
Matplotlibmatplotlib
Mayavimayavi
Gitgit
Sphinxsphinx

If these packages fail to build, you may need to install the Pythonheaders.

The most recent Linux version of DAKOTA is built on Red Hat Enterprise Linux 6.3. It should also run on other Linux distributions that maintain binary compatibility with RHEL, such as CentOS. Users of other Linux distributions and (non-Mac) *nix OSes may find it necessary to build DAKOTA from source.

Install Lapack Ubuntu

The Mac binaries are built on OS X 10.5.8.

Lapack Download

  1. Prepare your system by installing required dependencies. For a RHEL 6.3 system, these can be obtained from the Yum repositories by executing the command:
    The Mac OS X version of DAKOTA comes packaged with the libraries it requires.
  2. Extract the DAKOTA archive file in a suitable install location, e.g. /home/myusername. If you have root access, you may extract the archive in a shared directory, e.g. /usr/local.
  3. Make sure your OS can find the DAKOTA executables and libraries.
    1. Open the Bash startup file in your home folder using your favorite text editor. On Linux, this is ~/.bashrc. On Mac, it's ~/.bash_profile.
    2. On Linux and Mac, add the following line, replacing $INSTALL_DIR with the absolute path to your installation directory, e.g. /home/myusername or /usr/local/Dakota.
    3. On Linux only, add the following line, replacing $INSTALL_DIR as appropriate.
    4. On Mac OS only, add the following line, replacing $INSTALL_DIR as appropriate.
    5. Save and close the file. Close and reopen the terminal to activate the changes in your environment.
    For C shell:
    1. Open the csh startup file in your home folder (~/.cshrc) using your favorite text editor.
    2. On Linux and Mac, add the following line, replacing ${INSTALL_DIR} with the absolute path to your installation directory, e.g. /home/myusername or /usr/local/Dakota.
    3. On Linux only, add the following line, replacing $INSTALL_DIR as appropriate.
    4. On Mac OS only, add the following line, replacing $INSTALL_DIR as appropriate.
    5. Save and close the file. Close and reopen the terminal to activate the changes in your environment.