If you don't have a github account, or your SSH keys are not set up, you can use
HTTP to fetch the code. Note that some HPC facilities will block HTTP/HTTPS in
their firewall rules, so if these fail with an HTTP 405 code (or other errors),
you may need to use SSH.

Configure The Makefile

Gasoline uses a very simple build system: a single makefile! In the gasoline
repository you have just cloned, you should find a file, Makefile.default.
This is the skeleton Makefile you will use to build your copy of gasoline.
First, copy this to Makefile:

cp Makefile.default Makefile

Next, you will open Makefile in your text editor of choice. By default,
Gasoline is configured to build with "standard" physics options for doing
galaxy/ISM/cosmological simulations, using gcc as the compiler. If you wish to
use a different compiler, simply change the CC variable.

The Mode section (MODE_DEF) will allow you to select different sets of
physics modules for different types of problems (Collisional planet formation,
pure N-body with a stripped-down code, or a gravitational glass builder for
making initial conditions). You can also select which SPH smoothing kernel to
use in the Kernel section (KERNEL_DEF). We recommend sticking with the
Wendland C4 kernel unless you need to.

If you want to run with radiative cooling, you will need to choose a cooling
model from the Cooling section (the COOLING_OBJ and COOLING_DEF pairs).
If you want to disable cooling altogether, choose the final pair, with
COOLING_DEF set to -DNOCOOLING. Cooling can also be disabled in the
parameter file by setting bGasIsothermal = 1 or bGasAdiabatic = 1.

There are a number of extra modules for doing physics, controlling outputs and
performance, as well as debugging in the Extra Features section (EXTRA_DEF).
Some of these components conflict with each other, and will warn the user during
compile time of their incompatibility. Finally, if you wish to use either the
PNG writer for the frame dumping module, or the turbulent driver, you will need
to uncomment, and possibly configure some extra options in the Libraries
section.

Compile Gasoline

Once you have set up your Makefile, you are ready to compile the code. Gasoline
uses the mdl library to allow it to run on a variety of different architectures.
Luckily, most large parallel machines are x86_64 architecture with support for
MPI, so in general, if you are running in parallel on your desktop, make pthread will be the platform you choose, and when you are running on a
distributed-memory machine, make mpi will be the platform to choose. If you
are running on an older machine with Quadrics interconnects, use qmpi for your
platform. If your machine uses the older LAM/MPI communication protocal,
compile with make lam_mpi. If you are using the Charm++ AMPI, select it with
make ampi. Finally, if you wish to run with no parallel support, you can use
the null mdl platform.

When make completes building gasoline, you should have an executable called
gasoline in your source directory. You are now ready to run Gasoline!

Building Gasoline with Grackle cooling support

Currently, Gasoline only supports Grackle 2.1. To build Gasoline with Grackle cooling, first fetch the code: