Tutorial: first SPIDER run
This page walks you through a minimal SPIDER run, from compile to quick visualization.
Prerequisites
- You have installed PETSc and SPIDER by going through the installation guide.
- You have a working C compiler.
- Preferably: you are in a Conda environment with python version 3.12.
1. Run a known example
Use one of the provided options files:
./spider -options_file tests/opts/blackbody50.opts
This writes model output to the default output directory (typically output/).
Runtime
A first run on a laptop/workstation typically finishes in seconds to a few minutes, depending on CPU and PETSc settings.
To quickly verify output structure:
ls output
Expected signs of success:
outputexists and is non-empty.- Multiple text files are produced (for example, interior profile and time-series outputs).
- No PETSc crash/solver error is printed to terminal.
2. Make a quick plot
python py/plot_spider_lite.py -h
python py/plot_spider_lite.py -d output
The plotting script generates a basic figure of interior profiles from your run output inside the directory plots/.
3. Next steps
- Try a different options file in
tests/opts/. - Compare your run output against files in
tests/expected_output/.
Common first-run issues
PETSC_DIRorPETSC_ARCHnot set: Re-export them in your shell and rebuild../spidernot found: Build failed or you are not in the project root.- Plot script fails:
Install Python dependencies from
py/requirements.txt.