Skip to main content

GALFORM execution helper utilities

Project description

galform_execution

CI License: MIT

A Python-based utility to manage GALFORM N-body simulation submissions to SLURM on COSMA.

galform_execution automates the generation and submission of SLURM batch scripts for GALFORM runs. It handles environment setup, parameter injection into .input.ref files, and conditional post-processing (NETA, LUM_FUN, etc.), providing a robust and reproducible workflow for large-scale galaxy formation simulations.

Key Features

  • Dynamic Script Generation: Generates self-contained tcsh scripts with resolved simulation and model parameters.
  • Config-Driven: Manage simulations, models, and dust parameters via JSON configurations.
  • SLURM Optimized: Automatic job array support and remapping of high subvolume indices.
  • Robustness: Built-in retries with exponential backoff for transient scheduler errors.

Prerequisites

  • Environment: Access to the COSMA HPC cluster (Durham University).
  • Tooling: uv is recommended for fast installation and dependency management.

Installation

# Install the package and its dependencies directly from PyPI using uv
uv pip install galform_execution

For development installation from source:

git clone https://github.com/OscarHickman/galform_execution.git
cd galform_execution
uv pip install -e .

Quick Start

1. Identify your GALFORM directory

You need a compiled version of GALFORM with the standard directory structure (containing build/galform2, *.input.ref, etc.).

2. Preview a submission (Dry Run)

Check the generated SLURM script without submitting to the queue:

submit-galform-job /path/to/your/galform --nbody-sim Mill2 --model lc16 --iz 40 --nvol 1-64 --dry-run

3. Submit a job array

submit-galform-job /path/to/your/galform --nbody-sim Mill2 --model lc16 --iz 40 --nvol 1-64 --output-folder-name MyProject

Configuration

Configurations are stored in galform_execution/config/:

  • simulations/: JSON files defining N-body simulation parameters (tree paths, cosmology).
  • models.json: Maps model names to base input files and dust profiles.
  • redshift_lists/: Redshift mappings for various simulations.

Development

Running Tests

uv run pytest tests

Linting

uv run ruff check galform_execution

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galform_execution-0.1.5.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galform_execution-0.1.5-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file galform_execution-0.1.5.tar.gz.

File metadata

  • Download URL: galform_execution-0.1.5.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for galform_execution-0.1.5.tar.gz
Algorithm Hash digest
SHA256 792726fc7eb2e54c4f21061e46613630e92d34fd8fef83a6ea0dda9e4691630c
MD5 116e4d1d8a1d25f1392fe9c022351ee1
BLAKE2b-256 48d55886531356d4261bfc1c6ce3d6bcec2e1f74d392a4e209c1801745efac9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for galform_execution-0.1.5.tar.gz:

Publisher: publish.yml on OscarHickman/galform_execution

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file galform_execution-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for galform_execution-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dc86c54e0df50e46fb09b22cc39cd4d87f1329248e8d325c9801165552fc4f85
MD5 a7141c0567c39701203641d125ad4ec0
BLAKE2b-256 0d38390f3d075bccd35728683d4d35e8022f55a1ceb83e17cc00eb43778237a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for galform_execution-0.1.5-py3-none-any.whl:

Publisher: publish.yml on OscarHickman/galform_execution

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page