Home - galacticusorg/galacticus GitHub Wiki

Welcome to Galacticus

CI/CD

Welcome to the Galacticus project. Galacticus is a semi-analytic model of galaxy formation - a powerful toolkit for modeling the physics of how galaxies form. For a scientific description of the model see the New Astronomy article on Galacticus.

If you have questions about Galacticus you can ask them over in the discussion forum.

Contact

For questions about installing or using Galacticus, please contact:

Downloads

Snapshots of the entire source, along with statically-linked executables are created after every update to the code. You can check the status of the automated builds shown in the badges at the top of this page.

How do I install and use Galacticus?

Galacticus is designed to run on Linux, with experimental support for MacOS systems.

Installing using a pre-compiled binary

(These instructions are for Linux systems. For MacOS systems, see here.)

By far the easiest way to install and use Galacticus is to use a pre-compiled binary. To do this:

  • download and unpack the source and datasets that are needed at run-time:
wget https://github.com/galacticusorg/galacticus/archive/master.zip -O galacticus.zip
wget https://github.com/galacticusorg/datasets/archive/master.zip -O datasets.zip
unzip galacticus.zip
unzip datasets.zip
  • download and unpack the tools that are needed at run-time:
cd datasets-master
wget https://github.com/galacticusorg/galacticus/releases/download/bleeding-edge/tools.tar.bz2
tar xvfj tools.tar.bz2
  • download the pre-compiled binary, put it inside the galacticus directory and give it executable permissions:
cd galacticus
wget https://github.com/galacticusorg/galacticus/releases/download/bleeding-edge/galacticus.exe
chmod u=wrx galacticus.exe
  • set environment variables to indicate the locations at which you downloaded the source and data:
export GALACTICUS_EXEC_PATH=/path/to/galacticus/folder
export GALACTICUS_DATA_PATH=/path/to/datasets/folder

(Galacticus needs to write some data files to disk at run time. Usually these are written to $GALACTICUS_DATA_PATH/dynamic/. If you do not have write permission to that location, you should set the environment variable GALACTICUS_DYNAMIC_DATA_PATH to a path where dynamically-generated files can be written.)

You can then run a quick test model using:

./galacticus.exe parameters/quickTest.xml

Notes for WSL

We have successfully run Galacticus on Windows using WSL (Windows Subsystem for Linux), version 2, but found that version 1 did not allow Galacticus to run successfully. Therefore, to run Galacticus on WSL you should check that you are running version 2 of WSL and, if necessary, upgrade to version 2. Details on how to do this are available here.

Using a container

We provide Galacticus in containerized form using Docker. This creates a virtual environment in which Galacticus is already installed and ready for use - all you have to do is download the container. Instructions for how to do this are available here.

Installing from source

To install Galacticus from source (necessary only if you want to modify or add to the code yourself), the recommended approach is to use the installation script. The installation script will attempt to download and install all dependencies, before downloading and installing Galacticus.

Note that the degree of success you experience with the installation script may be less than you hoped for! If the script fails, open a bug report at the installation scripts repo.

Step-by-step instructions on how to compile Galacticus on Linux yourself are also available.

Tutorials

You can find a collection of tutorials on how to use Galacticus here.

Contribution guidelines

You can find full guidelines for contributing to the Galacticus project here.