Installing and Running Gadget-2

Installing and Running Gadget-2

This is the first of two posts detailing how to install and operate the Gadget-2 hydrodynamics code. Click here for the second post in the series.Today’s astrobite will be another in a series on career advice and useful astronomical tools.  So far, it looks like there’s been a dearth of posts on the tools of theoretical astrophysics, so I thought I’d take the opporunity to show how easy it is to run a simulation using Gadget-2, a smoothed particle hydrodynamics (or SPH) code.  Gadget-2 is open source and publically available, so anyone can run simulations with it.  In a future post, I’ll discuss how to set up and run a simple hydrodynamics test problem.The instructions for installing Gadget-2 will be highly platform dependent.  If you’re running Linux or UNIX, you have all of the tools you will need to compile the codes already. If you’re on a Mac, you’ll need to install and update Xcode, which includes all of the compilers you will need.  On Windows, you’ll probably need to install cygwin which will give your Windows installation full UNIX support. Since I have a Mac, I’m going to focus on getting these codes working on OS X Snow Leopard.  If you have a different system, it might not be possible to follow my instructions exactly.  I’ll be doing all of the simulations for this series of posts on my laptop, a Macbook Pro.First, you will need to download a few software packages. Gadget 2.0.7. Version 1.9 of the GNU scientific library (GSL). Version 2.1.5 of the FFTW fast Fourier transform library. A Message Passing Interface (MPI) library such...