If you want to use your G4/G5/Intel Mac with OS X for some serious numerical work, this site could be useful to you.
I have here, binaries, source, documentation and instructions to install Fortran, MPI, OpenMP, Octave, GDL, Cactus, Globus, RNPL, GRAVSIM and Xmgr Grace.
Most of these packages have been compiled/tested on TIGER OS X 10.4 and XCode Tools 2.4.1.
I'm adding LEOPARD OS X 10.5 binaries gradually, but note that most TIGER binares just work fine on LEOPARD.
Feel free to contact me with questions or problems! Note: Mac OS X 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/profile) export PATH=/usr/local/bin:$PATH
before using any of these tools.
The binary install option provided here, will literally take a
few seconds! Many consider this the quickest and easiest install
for some of these packages available on the web. If you choose to
get the source and compile, be warned that it may take several
hours even when everything goes perfectly!
NEW! If you want a nice OS X style installer package for gfortran
including a plug-in to use it with Apple's XCode, the good folks at MacResearch.org have created a really nice one. Download it
from this link. Please
consider contributing your Mac's number crunching ability to MacResearch.org's open distributed computing grid: OpenMacGrid.
Compiled using source code from the GNU CVS servers. This contains current versions
of gfortran (GNU F95, this is a version of the much awaited, free, open source, F95 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). 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-bin.tar.gz
(if your browser didn't do so already) and sudo tar -xvf gcc-bin.tar -C /. It installs
everything in /usr/local. You invoke F95 by typing gfortran. You will also need
to have Apple's Developer Tools installed. They are included on a separate CD in the retail
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. 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 F95 features, but there
are mixed reports regarding its optimization capabilities.
Recently compiled using source code from the GNU CVS servers. 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. Try it! You will need to have Apple's
Developer Tools installed. They are included on a separate CD in the retail
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.
ABSOFT: A commercial option for Fortran on OS X. It works very well,
I have used it extensively in the past. It includes f77, f90,
f95 and a rather nice IDE. For more information, try the Absoft
OS X product page.
NAG: A commercial f95 for OS X. Its optimization is quite good,
yielding much faster executables compared with g77. It is a very affordable
commercial solution. For information, try the
NAG Fortran
page.
IBM: A f90, C, C++ suite for OS X (PPC only). IBM had released its highly
optimized PPC compilers (including Fortran) for OS X. On my tests they
seem to provide a speed gain of about 2X on current G4/G5's over other
compilers. In my opinion, the best set of compilers for PPC OS X. Unfortunately,
with the Intel switch, these compilers will no longer be updated. In fact,
the C/C++ compilers are broken on Tiger. Warner Yuen from Apple has figured
out a fix that allows one to continue to use these on Tiger. Download the
fix from here and follow the instructions in
the README file.
INTEL: Intel now provides its excellent compilers, ifort and icc
for Intel Macs only. They optimize very well, including auto-vectorizing (for SSE)
and auto-parallelization (for multiple cores). Moreover, they are very affordable.
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.
MPI is the most widely used framework for parallel computing. With
this you can parallel compute over almost any kind of cluster ..
Mac's, SGI's, SUN's, Linux .. even over a hybrid or heterogeneous
cluster. If you want to use MPI with OS X, Warner Yuen from Apple has a really nice
set
of webpages, just for that purpose! They provide various binaries and how to
build them, also step-by-step instructions on setting up a cluster, including
enabling password-less logins, submitting jobs etc. Warner used IBM's XL compilers
to build everything, while I used gcc/g77 for the binaries below.
For Absoft's compilers, here is a webpage
that provides details instructions on how to build MPI.
MPICH: Get the source from the MPICH website, configure, make and install. Or
get my binaries, gunzip mpich-bin.tar.gz (if your browser didn't do so already)
and sudo tar -xvf mpich-bin.tar -C / and you are done! It installs in
/usr/local/mpich/.
LAM MPI: OS X is now officially supported! Download their universal binaries for OS X from
their site. An initial release of XMPI for OS X
has recently appeared. XMPI graphical user interface for running, debugging and
visualizing MPI programs.
Open MPI: A relatively new MPI project which officially supports OS X and Apple Xgrid.
This is now built into Leopard, and is my MPI distribution of choice. Check out
their website: OpenMPI.org.
There is also UCLA's
AppleSeed and MacMPI for Mac ONLY clusters that has been a big
success. It indeed is a very easy way to build and run a cluster. In
that sense it is very "Mac-like" in spirit. I was able to set up my Macs into a
parallel cluster in less than an hour! Running distributed simulations is
also very easy using their GUI based Pooch Application. They also
provide useful tutorials and detailed documentation on writing and running
parallel codes. Check those out at this link.
Furthermore in MPI software, there is the newly created MYMPI. MYMPI is a Python module
that allows parallel programming using MPI. It allows creating pure Python parallel
programs as well as mixing Python programs with Fortran or C programs. This package
was developed on OS X for the Biology group at UCSD.
These tools compile code optimized for dual processors based on
OpenMP directives. SMP is much easier to learn, compared to MPI therefore
this could be useful to some. GCC4 now includes OpenMP support.
See above for information and binaries. Another option is to get
the latest version of Omni MP compiler source, build and install.
This is a new tool that is built into Tiger, developed by Apple's ACG that makes it incredibly easy to run
a cluster of Macs by using Apple's technologies like Bonjour, etc. It can automatically seek available
resources and execute your simulation appropriately. Learn more about it at their site. The current
version even supports MPI. It is my first choice now for all batch and parallel tasks.
Note: If you are interested in other advanced parallel computing environments, try Parallel Virtual
Machine PVM and Unified Parallel C
UPC. These appear to have Mac OS X support. Also
Sun's Grid Engine SGE, which is a
batch queuing system also has an OS X port.
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).
Scilab is a scientific software package for numerical computation providing a
powerful open computing environment for engineering and scientific applications.
For OS X binaries, visit Jean-Phillippe's site
on installation options and also this
link.
Gnu Data Language (GDL) is an open source implementation of Interactive Data Language
(IDL) which is an expensive commercial software package developed by Research Systems Inc. To find out more, visit the
GDL website. To install, download
my GDL version 0.9 binaries, gunzip gdl-bin.tar.gz (if your browser didn't do so already) and
then sudo tar -xvf gdl-bin.tar -C / and you are done! It installs in
/usr/local.
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 in
Albert-Einstein-Institute, MPG, Germany: Cactus Demo. Check it out!
Cactus compiles and runs great on Mac OS X. For some more info, check out
CactusCode's OS
X compatibility web page.
The Globus project is about developing technology to build grids
for high performance computation. Grids are environments that
enable software applications to integrate instruments, displays,
computational and information resources that are managed by diverse
organizations in widespread locations. As an example, look at this
web
page that has information on a Cactus based grid computation of
the collision of two black holes. See the link below for information on
how to get Globus and related Grid Tools running on OS X.
Condor is a software system developed at the University of Wisconsin that provides
computing capabilities through efficient capture of cycles on idle machines (HTC).
The software, operating within an HTC (High Throughput Computing)
rather than a traditional HPC (High Performance Computing) paradigm, organizes machines
into clusters that can exchange resources. Condor then hunts for idle workstations to run jobs.
Condor can migrate jobs to other machines, if needed. The Condor Project now officially supports
Mac OS X!
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.
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!
This is a very easy to use, open-source, X11 based, plotting tool. I've been using it since 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.
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!