HepForge user guide for OS X installations

Since June 2014 Hepforge supports the MacPorts system for easy installation of projects. It's still experimental, please report any bugs to admin at hepforge.

At the moment, the implemented projects are

   fastjet hepmc herwig lhapdf lhapdf-data rivet thepeg yoda


Initial Macports setup

  • Install Xcode and MacPorts by following these instructions.
  • Check the installation with sudo port -v selfupdate. Do not continue if there's a problem here.

Initial setup of Hepforge sources

To add information about the Hepforge packages, you need to edit one config file.

Run sudo nano -w /opt/local/etc/macports/sources.conf. The end of the file should look similar to this:

# For proper functionality of various resources (port groups, mirror
# sites, etc.), the primary MacPorts source must always be tagged
# "[default]", even if switched from the default "rsync://" URL.

rsync://rsync.macports.org/release/tarballs/ports.tar [default]

Add the one-line URL of the Hepforge MacPorts files before the default line:

rsync://rsync.macports.org/release/tarballs/ports.tar [default]

Save the file (that's CTRL-X in the nano editor).

First project install

  • We need another sudo port -v selfupdate, to incorporate the new portfiles.
  • Check that it works by running port info yoda.
  • install Python: sudo port install python27
  • switch to this python: sudo port select --set python python27
  • Install your favourite package: sudo port install herwig
  • From time to time you should run sudo port selfupdate; sudo port upgrade outdated to fetch the latest versions.

Project variants

The port of lhapdf-data is one of the packages which provides several variants, in this case with different PDF sets. Inspect the available variants with port variants lhapdf-data. Two are pre-selected, but you can install additional variants with +-options after the install command:

sudo port install lhapdf-data +atlas

Useful commands

The most commonly used commands after installation are

  • sudo port selfupdate; sudo port upgrade outdated
  • sudo port install
  • port variants
  • port help

Building other Hepforge projects from source

For projects that do not have a port yet, or if you're building from sources for other reasons, we provide a convenience port hepforge-dev-tools that pulls in most development tools that are necessary for successful builds on OS X. With this setup, we have not had any of the frequently occurring linking problems from mismatched versions:

 sudo port install hepforge-dev-tools

After that, you should set the Fortran compiler variable to gfortran-mp-4.8 by hand:

 export FC=gfortran-mp-4.8

Also, switch python to the Macports one:

 sudo port select python python27

Ports support for additional projects

Please provide a draft Portfile to admin at hepforge, to incorporate in the tarball. Example portfiles are in the current distribution. The MacPorts website also has generic instructions for writing Portfiles.