Gizmo Quickstart
This chapter walks you through compiling and running GIZMO from the public repository to establish a clean baseline.
Goal Checklist
Section titled “Goal Checklist”- Install Conda for your OS (Miniforge).
- Create and activate a
gizmo-labenvironment. - Build GIZMO with a machine-appropriate Makefile setup.
- Launch one baseline run using a valid parameter file.
- Confirm executable and runtime libraries are consistent.
Installation
Section titled “Installation”1) Install Miniforge by OS
Section titled “1) Install Miniforge by OS”0) Install and verify WSL2 + Ubuntu
Section titled “0) Install and verify WSL2 + Ubuntu”Run PowerShell/Windows Terminal as Administrator:
wsl --install -d Ubuntuwsl --set-default-version 2wsl -l -vIf wsl --install only prints help:
wsl --list --onlinewsl --install -d UbuntuIf install stalls at 0.0%:
wsl --install --web-download -d UbuntuReboot if needed, then launch Ubuntu and create your Linux username/password.
1) Install Miniforge (inside Ubuntu)
Section titled “1) Install Miniforge (inside Ubuntu)”sudo apt updatesudo apt install -y curl bzip2
curl -L -o ~/miniforge.sh \ "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh"bash ~/miniforge.sh -b -p "$HOME/miniforge3"
source "$HOME/miniforge3/etc/profile.d/conda.sh"conda init bash0) Install Miniforge
Section titled “0) Install Miniforge”xcode-select --install
curl -L -o ~/miniforge.sh \ https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-$(uname -m).shbash ~/miniforge.sh -b -p "$HOME/miniforge3"
source "$HOME/miniforge3/etc/profile.d/conda.sh"conda init zshsudo apt updatesudo apt install -y curl bzip2
curl -L -o ~/miniforge.sh \ "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh"bash ~/miniforge.sh -b -p "$HOME/miniforge3"
source "$HOME/miniforge3/etc/profile.d/conda.sh"conda init bash2) Create gizmo-lab
Section titled “2) Create gizmo-lab”conda create -n gizmo-lab -c conda-forge \ python=3.11 compilers make git pkg-config \ openmpi mpi4py gsl fftw hdf5 -y
conda activate gizmo-labwhich pythonwhich mpiccecho "$CONDA_PREFIX"GIZMO’s core dependencies are MPI, GSL, FFTW, and HDF5.
When using FFTW3, enable USE_FFTW3 in Config.sh.
If you see fftw_mpi link errors, make sure you are building from the same activated gizmo-lab shell.
3) Obtain source
Section titled “3) Obtain source”git clone https://github.com/pfhopkins/gizmo-public.gitcd gizmo-public4) Configure compile-time options and machine settings
Section titled “4) Configure compile-time options and machine settings”GIZMO follows the GADGET-style build pattern:
- Set compile-time options in
Config.sh(fromTemplate_Config.sh) - Set machine/library/compiler options in
Makefile/Makefile.systype
cp Template_Config.sh Config.sh 2>/dev/null || cp Template-Config.sh Config.sh# select/edit SYSTYPE and library paths in Makefile.systype / Makefile as needed5) Build and run
Section titled “5) Build and run”makempirun -np 4 ./GIZMO <parameterfile>If your Makefile defines a different executable name, use that name instead.
6) Quick validation
Section titled “6) Quick validation”- Build completes with no unresolved MPI/GSL/FFTW/HDF5 symbols.
- Run starts and writes expected outputs/logs.
- Runtime does not fail due to FFTW version mismatch flags.