-
Notifications
You must be signed in to change notification settings - Fork 61
Build on OS X
Madness on a Mac Build MADNESS on Mac OS X
- Apple Xcode 3.2 or later
- MPI-2
- BLAS and LAPACK (Accelerate included with OS X)
- GNU Autotools
- autoconf 2.59 or later
- automake 1.11 or later
- git
- Package management software
- MacPorts
- Homebrew
- Eigen 3
- libxc
- MADxc
- TBB
- Elemental
- Gperftools (not recommended)
- Google Test
- Doxygen
- pkg-config
- Open Mac App Store
- Search for and “Buy” Xcode (it is free). Wait for Xcode to finish the download and installation.
- In Terminal run:
$ xcode-select --install
- Open Mac App Store
- Search for and “Buy” Xcode (it is free). Xcode will automatically start downloading and install itself.
- Open Xcode
- Go to Xcode->Preferences...
- Select the Downloads and then the components tab
- Click “Install” next to “Command Line Tools”
- Check the “Check for and install updates automatically” box
If you do not want to install Xcode, you may install just Apple's Command-Line Tools package (the same package you would install in Xcode 4.3.x or later). You can download it from the Apple Developer website. The only disadvantage to this method is that you must update this software manually.
- Download Xcode 3.2.6 for Snow Leopard or 3.1.4 for Leopard from Apple’s Developer website. You will need to log in with your Apple ID.
- Open the .dmg file
- Double click install package
- Follow the prompts
MacPorts is a command-line tool that automates the process of downloading, configuring, installing, and updating open-source software in OS X. Most of the software required by MADNESS is available through MacPorts. To install MacPorts:
- Download the install package from: http://www.macports.org/
- Open the downloaded .dmg file.
- Double click the install package
- Follow the prompts
- Once MacPorts is installed, in terminal run:
$ sudo port selfupdate
Note: If you are behind a firewall or proxy and having trouble syncing portfiles, you can use the alternate download method described here https://trac.macports.org/wiki/howto/PortTreeTarball.
You can install the remaining software need by MADNESS with MacPorts.
$ sudo port install autoconf automake libtool pkgconfig git eigen3 doxygen mpich-default
- Note:* Older versions of Xcode included autoconf and automake, but they are very old and do not work correctly with MADNESS.
- Note:* Gperftools 2.0 does not work correctly on OS X. If you want/need Google Perftools, 1.7 is partially functional. You will need to build it from source. Unless you intend to use the it for profiling purposes, you should not install or use Google Perftools.
In Terminal:
$ mkdir madness $ cd madness $ git clone https://github.com/m-a-d-n-e-s-s/madness.git src $ cd src $ ./autogen.sh $ cd ..
$ mkdir build $ cd build
The configure commands below assume that Google Perftools and Google Test were installed in /opt/local with MacPorts. You need to change the paths for `--with-google-test` to the install paths for these packages. If you did not install one or both of these packages, you need to remove the corresponding options.
$ ../src/configure \ --enable-debugging \ --disable-optimization \ --enable-warning \ --disable-optimal \ --with-google-test=/opt/local \ CC="/usr/bin/clang" \ CXX="/usr/bin/clang++" \ CPPFLAGS="-ansi" \ LDFLAGS="-framework Accelerate -Wl,-no_pie"
$ ../src/configure \ --enable-debugging \ --disable-optimization \ --enable-warning \ --disable-optimal \ --with-google-test=/opt/local \ CC="/usr/bin/gcc" \ CXX="/usr/bin/g++" \ CPPFLAGS="-ansi" \ LDFLAGS="-framework Accelerate"
$ make -j
The following compiles have been tested with MADNESS on OS X and are known to work.
- Apple's Clang 2.0 (svn 2.9) and later -- Preferred
- Apple's LLVM GCC 4.2.1 -- deprecated in OS X 10.8, discontinued in OS X 10.9
- Apple's GCC 4.2.1 -- deprecated in OS X 10.7, discontinued in OS X 10.9
- LLVM Clang 2.9 and later (same as Apple's version)
- Intel 11.x and later