Difference between revisions of "BBP on OS X Guide"

From SCECpedia
Jump to navigationJump to search
Line 46: Line 46:
 
# Compile the Broadband Platform by going into the src directory and typing "make"
 
# Compile the Broadband Platform by going into the src directory and typing "make"
 
# Continue the Installation Instructions on [[Broadband_User_Guide_v15.3.0#User_Account_Setup|Broadband User Guide v15.3.0]]
 
# Continue the Installation Instructions on [[Broadband_User_Guide_v15.3.0#User_Account_Setup|Broadband User Guide v15.3.0]]
 +
 +
=== Unit and Acceptance Tests for Mac OS X ===
 +
  
 
== Potential Additional Steps ==
 
== Potential Additional Steps ==

Revision as of 16:39, 11 June 2015

Introduction

The Broadband Platform is compatible with Linux as well as OS X. However, due to some recent changes that Apple has made to their Xcode development tools, users on Mavericks (OS X 10.9) and Yosemite (OS X 10.10) will need to follow some additional steps to make the installation work. There are several installation issues or limitations related to the BBP on a Mac. The primary target operating system for BBP is Linux. Mac's OS is somewhat different environment, so installation on a Mac is a bit more complex.

The key Mac OS X-specific issues include:

  • Mac must have a full Python installation that includes NumPy, SciPy, matplotlib and other packages
  • Mac must have a gcc compiler environment, obtained through the XCODE software
  • Mac must have a gcc fortran compiler installed, not available in XCODE. If you follow the instructions given in the Mac Ports section below, it will required administrator account privileges because these will be required to install the fortran compiler in the default location.
  • Mac must have specialized Python language geographic project module pyproj installed
  • Currently, the SDSU BBToolbox software is not compatible with the Mac environment. The code will crash and as a result the SDSU method does not pass all Unit tests when compiled on a Mac. This is a known, Mac-specific issue. The SDSU method passes all tests in the target Linux environment. We will provide a resolution to this know limitation of the Mac-version of the BBP, as soon as one is available.

BBP 15.3.0 Installation on Mac OS X

This section describes the installation of the BBP 15.3.0 distribution on Mac OS X using a package management tool called Mac Ports. Mac Ports simplifies the installation process by automating several of the installation steps, but it will require administrator access unless you want to install it from the source (a few extra steps that we will not cover in this guide). If you prefer not to use Mac Ports, you can follow the directions provided by one developer who installed BBP 15.3.0 without using Mac Ports. Details are provided in the BBP_on_OS_X_Guide_Without_Mac_Ports page.

The steps below will guide you through the installation of Mac Ports and the necessary C/Fortran GNU compilers in addition to the Python packages required by the Broadband Platform. At the end of this section, we provide information about running the Unit and Acceptance Tests available on the Broadband Platform, along with some Mac OS X-specific details.

OS X 10.9 Mavericks using MacPorts

Installing OS X on Mavericks is possible by following these steps:

  1. Install Xcode from the Mac App Store
  2. Install the Xcode command line tools. To do this, in your Terminal window, please type:
    $ sudo xcode-select --install
    A dialog box will pop-up asking if you want to install the command line tools. Please choose "OK" on this box.
  3. Accept Xcode license by typing:
    $ sudo xcodebuild -license
    Scroll to the end and then type 'agree'.
  4. Then install MacPorts from http://www.macports.org. MacPorts helps install the requirements to compile the Broadband Platform. The version of MacPorts we used was 2.3.3, please make sure you install the package for OS X 10.9 Mavericks
  5. Install GCC 4.8 using the following command:
    $ sudo port install gcc48
  6. ​​​​ Select the new compiler as the default compiler using the command:
    $ sudo port select gcc mp-gcc48
  7. Install the PIP package manager for Python, using the command:
    $ sudo easy_install pip
  8. Install PyProj, using the command:
    $ sudo pip install pyproj
  9. Compile the Broadband Platform by going into the src directory and typing "make"
  10. Continue the Installation Instructions on Broadband User Guide v15.3.0

OS X 10.10 Yosemite using MacPorts

In order to install the Broadband Platform on Yosemite, you must follow these steps:

  1. Install Xcode from the Mac App Store
  2. Install the Xcode command line tools. To do this, in your Terminal window, please type:
    $ sudo xcode-select --install
    A dialog box will pop-up asking if you want to install the command line tools. Please choose "OK" on this box.
  3. Accept Xcode license by typing:
    $ sudo xcodebuild -license
    Scroll to the end and then type 'agree'.
  4. Then install MacPorts from http://www.macports.org. MacPorts helps install the requirements to compile the Broadband Platform. The version of MacPorts we used was 2.3.3, please make sure you select the package for OS X 10.10 Yosemite
  5. Install GCC 4.9 using the following command:
    $ sudo port install gcc49
  6. Select the new compiler as the default compiler using the command:
    $ sudo port select gcc mp-gcc49
  7. Install the PIP package manager for Python, using the command:
    $ sudo easy_install pip
  8. Install PyProj, using the command:
    $ sudo pip install pyproj
  9. Compile the Broadband Platform by going into the src directory and typing "make"
  10. Continue the Installation Instructions on Broadband User Guide v15.3.0

Unit and Acceptance Tests for Mac OS X

Potential Additional Steps

One developer needed to run the following commands to make the Mac installation work. These are not needed on a clean installation but could be required to repair or upgrade an existing Mac OS X setup.

  • export PYTHONPATH=/Library/Python/2.7/site-packages/:$PYTHONPATH
  • sudo pip install scipy --upgrade
  • sudo pip install numpy --upgrade
  • sudo pip install matplotlib --upgrade

Related Entries