How jairomcarmona/siestaflow works
Purpose and entry points
SIESTAFLOW is a Python 0.2 alpha orchestrator for declarative SIESTA DFT campaigns executed inside persistent SLURM allocations. It prepares portable, hash-verified controller packages locally; users manually transfer and submit them. Primary CLI entry points are src/siestaflow/cli.py and src/siestaflow/__main__.py; package metadata is in pyproject.toml.
Project and campaign specification
Project examples define systems, structures, pseudopotentials, resource profiles, policies, authorizations, expected contracts, and campaign matrices. These are data boundaries: scientific choices remain project-owned rather than core-owned.
• src/siestaflow/project.py
• src/siestaflow/campaign.py
• examples/generic/minimal_siesta_smoke/project.yaml
Authorization and gate-controlled planning
Before execution, authorization and gate records constrain which campaign phases may proceed. Campaigns can form dependency DAGs, with gates representing explicit scientific or operational acceptance points rather than implicit controller decisions.
• src/siestaflow/authorization.py
• src/siestaflow/gates.py
• src/siestaflow/siesta_campaigns.py
SIESTA engine boundary
The SIESTA adapter validates and renders FDF inputs, produces engine commands and required artifacts, resolves pseudopotentials, and parses output into structured result models. The supported FDF registry isolates engine-version-specific vocabulary.
• src/siestaflow/engines/siesta/adapter.py
• src/siestaflow/engines/siesta/fdf_renderer.py
• src/siestaflow/engines/siesta/output_parser.py
Local preparation and immutable package boundary
Local commands validate project inputs and assemble self-contained remote/controller packages with manifests, checksums, embedded runtime code, inputs, and artifacts. This boundary deliberately stops before remote transfer/submission; package integrity enables manual transport and reproducible remote execution.
• src/siestaflow/project_packages.py
• src/siestaflow/controller_package.py
• src/siestaflow/m4_remote_package.py
Allocation-local execution controller
Once submitted, the packaged controller runs within one SLURM allocation. It manages phase dependencies, resource placement, concurrent waves, launch selection, controlled shutdown, recovery/resubmission, and durable progress state. Launch backends support srun, direct execution, and Hydra (mpiexec.hydra -bootstrap ssh).
• src/siestaflow/execution/allocation_controller.py
• src/siestaflow/execution/srun_launcher.py
• src/siestaflow/execution/hydra_launcher.py
Scheduler and remote-environment integration
SLURM is the material infrastructure boundary: scheduler environment inspection, partition/account association resolution, allocation launch, and job-evidence collection are separated from core campaign semantics. Yoltla-specific profiles and remote probes encode observed cluster conditions.
• src/siestaflow/execution/slurm_environment.py
• src/siestaflow/validation/scheduler_resolution.py
• config/cluster_profiles/yoltla_siesta.yaml
Runtime evidence and operational packages
The repository includes deployable remote validation packages for environment probing, real SIESTA smoke runs, single-allocation execution, and staged MnO₂ campaigns. They carry SLURM scripts, manifests, pseudopotentials, and minimized embedded runtime copies; these are acceptance artifacts alongside the installable src package.
• remote_validation/M4_SURF_GR5X5_SINGLE_ALLOCATION_REMOTE_SMOKE/campaign.slurm
• remote_validation/M4_SURF_GR5X5_SINGLE_ALLOCATION_REMOTE_SMOKE/runtime/siestaflow/execution/allocation_controller.py
• remote_validation/YOLTLA_M1_MNO2_STAGED_CAMPAIGN_V2/campaign_graph.json
Main entry points: allocation_controller.py Allocation controller · siesta_campaigns.py SIESTA campaign DAG · project_packages.py Project package builder · project.py Project definitions
Components 20
Project specification
Scientific choices and campaign intent remain project-owned.
- Project definitions
src/siestaflow/project.py - Campaign matrix
src/siestaflow/campaign.py - Example project YAML
examples/generic/minimal_siesta_smoke/project.yaml
Planning controls
Authorization and explicit gates constrain campaign progression.
- Authorizations
src/siestaflow/authorization.py - Acceptance gates
src/siestaflow/gates.py - SIESTA campaign DAG · Builds dependency-aware campaign phases.
src/siestaflow/siesta_campaigns.py - SIESTA adapter · Validates inputs, resolves artifacts, and creates engine commands.
src/siestaflow/engines/siesta/adapter.py - FDF renderer
src/siestaflow/engines/siesta/fdf_renderer.py
Local packaging
Local preparation ends at an immutable package for manual transport.
- CLI entry points
src/siestaflow/cli.py - Module entry point
src/siestaflow/__main__.py - Project package builder · Validates project inputs and assembles portable package contents.
src/siestaflow/project_packages.py - Controller package · Contains manifests, checksums, runtime, inputs, and artifacts.
src/siestaflow/controller_package.py - M4 remote package
src/siestaflow/m4_remote_package.py
Allocation execution
Packaged runtime orchestrates work inside one SLURM allocation.
- SIESTA output parser
src/siestaflow/engines/siesta/output_parser.py - Allocation controller · Schedules dependency waves, placement, recovery, and durable progress.
src/siestaflow/execution/allocation_controller.py - Launch backends · Supports srun and Hydra launches.
src/siestaflow/execution/srun_launcher.py
Infrastructure evidence
Scheduler integration and deployable validation artifacts.
- SLURM environment · Inspects allocation environment and gathers job evidence.
src/siestaflow/execution/slurm_environment.py - Scheduler resolution · Resolves partition and account associations.
src/siestaflow/validation/scheduler_resolution.py - Yoltla profile
config/cluster_profiles/yoltla_siesta.yaml - Remote validation packages · Deployable smoke and staged-campaign evidence packages.
remote_validation/M4_SURF_GR5X5_SINGLE_ALLOCATION_REMOTE_SMOKE/campaign.slurm
Connections 22
- Module entry point → CLI entry points: invokes
- Example project YAML → Project definitions: instantiates
- Project definitions → Campaign matrix: defines inputs for
- Campaign matrix → SIESTA campaign DAG: expands into
- Authorizations → SIESTA campaign DAG: constrains
- Acceptance gates → SIESTA campaign DAG: authorizes phases
- SIESTA campaign DAG → SIESTA adapter: uses
- SIESTA adapter → FDF renderer: renders inputs with
- CLI entry points → Project package builder: prepares locally
- Project definitions → Project package builder: validated by
- SIESTA campaign DAG → Project package builder: packages plan
- SIESTA adapter → Project package builder: supplies inputs and artifacts
- Project package builder → Controller package: builds
- M4 remote package → Controller package: assembles
- Controller package → Allocation controller: manually transferred and run
- Allocation controller → Launch backends: selects
- Allocation controller → SIESTA output parser: parses completed runs
- Allocation controller → SLURM environment: runs within
- Scheduler resolution → SLURM environment: resolves resources for
- Yoltla profile → Scheduler resolution: configures
- Remote validation packages → Allocation controller: embeds and exercises
- Remote validation packages → SLURM environment: captures acceptance evidence