Skip to content
Andrew Benson edited this page Apr 11, 2024 · 6 revisions

Welcome to the Galacticus installation scripts

This repo contains scripts which attempt to install the Galacticus semi-analytic model. They are intended for use on Linux systems.

Linux installs

The installation script should be run at the command line, simply using:

./galacticusInstall.sh [options]

When run without any options specified the script will interactively ask questions to determine how and where Galacticus should be installed. These questions are described in the following subsections.

Installation as root or as user

The installation script can install Galacticus with or without root privileges. Installing as root can be easier as it allows many packages to be installed via a package manager. Installing as user is often necessary though if you do not have root access on your machine.

If you run the installation script as root (or with sudo) then it will attempt to install all tools an libraries as root. You will be asked to provide a path to which they should be installed - typically this would be something such as /usr/local.

If run as a regular user the script will ask if you want to attempt to install as root. If you answer "yes" you will then be asked whether the script should use su or sudo for root access, and to provide the root password.

If you answer "no" you will be asked to provide a path to which tools and libraries should be installed. This could be your home directory or any other directory where you have write permissions.

If you choose to install as root you will also be asked if a package manager should be used to install libraries and tool when possible. Currently the yum and apt package managers are supported.

Installation level

The script will next ask for what level of installation you want. There are three options:

  • binary A precompiled binary executable of Galacticus will be installed. This requires no installation of other tools or libraries and so is the easiest and fastest install. However, you won't be able to modify the source code yourself.
  • minimal This option installs the bare minimum set of tools and libraries needed to build Galacticus from source. This is recommended if you want to be able to modify the Galacticus source code.
  • full This option installs additional optional libraries that give the full functionality of Galacticus. This is recommended only if you need this full functionality.

Number of cores to use

Since compiling some of the tools and libraries can take a long time, the installation script will use multiple cores to compile when possible. You will be asked how many cores to use for this purpose (the maximum number of cores available on your system will be shown).

Installation path for Galacticus

Once all tools are installed you will be asked for the path to which Galacticus itself should be installed.

Set environment variables

Galacticus requires certain environment variables be set to point to its installation locations. The script will ask you if you want it to automatically add these to your .bashrc or .cshrc files so that the environment variables are automatically set.

Command line options

The above options can all alternatively be specified via the command line.

  --toolPrefix : the installation path for tools (e.g. $HOME/galacticusTools)

  --asRoot : "yes" or "no" to indicate if installation should be done as root

  --cores : the number of cores to use when compiling

  --galacticusPrefix : the installation path for Galacticus (e.g. $HOME/galacticus)

  --installLevel : the installation level, "binary", "minimal", or "full"

  --packageManager : "yes" or "no" to indicate if a package manager should be used to install tools (only relevant for root installs)

  --rootPwd : the password for root (only relevant for root installs)

  --setCShell : "yes" or "no" to indicate if environment variable should be appended to your .cshrc file

  --setBash : "yes" or "no" to indicate if environment variable should be appended to your .bashrc file

  --ignoreFailures : "yes" or "no" to indicate if failures should be ignored (if "no" the installer will stop after failing to install any package, if "yes" it will continue as far as possible)

  --suMethod : "su" or "sudo" to indicate the method to gain root access (only relevant for root installs)