HPC on Mac OS X


If you'd like to use your PowerPC/Intel Mac with OS X for some numerical computation, this site could be useful to you.

If you'd like to use your Apple Mac with OS X for some numerical computation, this site could be useful to you. Most of these packages have been compiled/tested on OS X 10.7 (LION), 10.8 (M. LION) and XCode Tools 4.x. Feel free to contact me with questions or problems!

Note: Mac OS X 10.6 does not include/usr/local/bin in its default PATH. Therefore, assuming you're using the default bash shell, please type (or include in /etc/profileexport PATH=/usr/local/bin:$PATH before using any of these tools.

Computation Tools :: C/Fortran

GCC 4.8 (auto-vectorizing gcc with OpenMP) :

Compiled using source code from the GNU CVS servers. This contains current versions of gfortran (free, open source, GNU Fortran 95 compiler), gcc (GNU C) and g++ (GNU C++) compilers that can perform auto-vectorization (i.e. modify code to take advantage of AltiVec/SSE, automatically) and other sophisticated optimizations. Use flag -O3 -ftree-vectorize to enable that option. For more information, see this webpage. Download my binaries, and cd to the download folder. Then gunzip gcc-lion.tar.gz (if your browser didn't do so already) and sudo tar -xvf gcc-lion.tar -C /. It installs everything in /usr/local. You can invoke the Fortran 95 compiler by simply typing gfortran. You will also need to have Apple's XCode Tools installed from the Mac App StoreOn LION, with XCode 4.3 you will need to download the command-line tools as an additional step. You will find the option to download the command-line tools in XCode 4.3's Preferences. Finally, note that there is an alternate g95 project, that is not part of GCC. They seem to have recently released their own official version of g95 for OS X which you may wish to try. Again, note that that g95 is not the same as this version here. Some reports suggest that this alternate g95 is ahead in the implementation of Fortran 95 features, but there are mixed reports regarding its optimization capabilities. 


gcc-lion.tar.gzgfortran-lion.tar.gz (gfortran only), updated April 2012 (10.7 Lion only).

gcc-snwleo-intel-bin.tar.gzgfortran-snwleo-intel-bin.tar.gz (gfortran only), updated April 2011 (10.6 Snow Leopard only).

Documentation: click here!

g77 3.4 :

This is the FINAL release of g77 (version 3.4 compiler). Future versions of GCC will have gfortran (see above). Download my binaries, and cd to the download folder. Then gunzip g77-bin.tar.gz (if your browser didn't do so already) and sudo tar -xvf g77-bin.tar -C /. It installs everything in /usr/local. You will need to have Apple's Developer Tools installed. They are included on the retail DVD version of OS X and also available as a free download from Apple's Developer Site. Please install the most current version of Developer Tools. Thanks to James Wookey for the Intel Mac version of g77.

Binaries: g77-bin.tar.gz (PowerPC only), g77-intel-bin.tar.gz (Intel Mac only), updated October 2006.
Documentation: click here!

F2C based Fortran:

This is the oldest Fortran compiler available for OS X. Its been around since OS X was in a public beta state. Download this shell script: buildf2c, type chmod +x buildf2c and then sudo ./buildf2c. The script will grab f2c source from Netlib repositories and install a f2c based compiler in /usr/local/. You are done! The compiler can be envoked by the commands fc or f2c.

Install script: buildf2c
Documentation: click here!

Computation Tools :: Octave


Octave is an open source, Matlab-like numerical analysis software package that is very popular among scientists and engineers. The good folks over at Octave-Forge provide an OS X style Octave application, with drag and drop installation! I recommend their binaries (links below). 

Source: Octave
Binaries: Octave application, updated May 2011.
Documentation: click here!

Computation Tools :: Cactus, RNPL, etc.

Einstein Toolkit:

The Einstein Toolkit is an open-source software framework specifically targeted to the research area of numerical relativity and astrophysics. The broad aim of the toolkit is to provide the core computational tools that enable scientific research in this area, and take advantage of emerging petascale computers and advanced cyberinfrastructure. The Einstein Toolkit compiles and runs great on Mac OS X. A critical component of this toolkit is the Cactus Computing Toolkit (see below).

Source: click here!
Documentation: click here!

CactusCode (Numerical Computing Toolkit):

Cactus is an open source problem solving environment designed for scientists and engineers. Its modular structure ("thorns") easily enables parallel computation across different architectures and collaborative code development between different groups. It is mainly used for solving complicated PDE's. It highly portable, and has some really remarkable features like observing and even "controlling" or "steering" a running simulation using an ordinary web browser! Here is a link to a perpetual demo running at LSU Cactus Demo. Check it out! Cactus compiles and runs great on Mac OS X. 

Source: click here!
Documentation: click here!

RNPL (Rapid Numerical Prototyping Language):

This is a great tool that takes as input details about the form of an equation (usually a partial differential equation), and some parameters .. and then spits out a C or FORTRAN Code that solves the equation numerically using established iterative numerical techniques. RNPL can also be used for producing skeleton programs and for converting existing programs. Download the source, compile and install. This source has been modified to compile with OS X. Or get my binary distribution. You probably want to install this in /usr/local, to do so gunzip rnpl-bin.tar.gz (if your browser didn't do so already) and then sudo tar -xvf rnpl-bin.tar -C / and you are done! You will need to use the F77 flag: -fno-second-underscore, for RNPL generated F77 codes to compile properly.

Source: rnpl.tar.gz
Binaries: rnpl-bin.tar.gz, updated 2003.
Documentation: click here!

Computation Tools :: Other Miscellaneous

The GRAVSIM Package:

GRAVSIM is a package that contains an ever evolving and hopefully growing set of gravitational N body solvers. These solvers attempt to track the motion of a set of bodies moving under the influence of gravity. They are used in many areas of astrophysical study including planetary motion, star cluster formation and stability and galactic formation, stability and interactions (i.e. colliding galaxies). This package is highly AltiVec and DP optimized! 

Source and Binaries: click here!
Documentation: click here!

Xmgr Grace :

This is a very easy to use, open-source, X11 based, plotting tool. I used it during my graduate school days and still love it. Its excellent especially for students and free! Note: I did not create this binary, but I have tested it on both Intel and PPC Macs. It works very well. Move the Grace application to the system /Applications folder for it to function correctly. By the way, if you are looking for a nice, easy to use, 2D and 3D, plotting package for OS X, try pro Fit. It works great. They have a free trial version, that is not time-limited and is full-featured. It just has some restrictions on the volume of data you can make it handle. Even the full version is very inexpensive.

Binaries: Grace applicationGrace for LION, updated Jan 2012.
Documentation: click here!