Skip to content

Parallel Compute

RAS Commander provides multiple strategies for scaling HEC-RAS computations, from single-machine parallelization to distributed execution across multiple remote workers.

Scaling Strategies Overview

Strategy Use Case Throughput Complexity
Sequential Debugging, simple workflows 1x Low
Local Parallel Multi-core workstation 2-8x Low
Remote Parallel Multiple machines 10-100x+ Medium
Hybrid Mixed local + remote Maximum High

Key Concepts

Worker Folders

All parallel execution methods use worker folders - isolated copies of the HEC-RAS project where computations run independently. This approach:

  • Prevents file locking conflicts
  • Enables concurrent plan execution
  • Preserves the original project files
  • Allows results collection from multiple runs

Plan Independence

HEC-RAS plans can run independently when they:

  • Don't share geometry preprocessor files
  • Don't write to the same output locations
  • Have no interdependencies (e.g., initial conditions from another run)

Core Allocation

HEC-RAS 2D computations can use multiple CPU cores. The optimal allocation depends on:

  • Model size: Larger meshes benefit from more cores
  • Available cores: Diminishing returns beyond 8-16 cores per plan
  • Concurrent plans: Balance cores per plan vs. simultaneous plans

Quick Comparison

Python
from ras_commander import RasCmdr, init_ras_project

init_ras_project("/path/to/project", "6.5")

# Sequential - one plan at a time
result = RasCmdr.compute_plan("01")

# Local Parallel - multiple plans on same machine
results = RasCmdr.compute_parallel(
    plan_number=["01", "02", "03", "04"],
    num_workers=4,
    num_cores=4
)

# Remote Parallel - distributed across machines
from ras_commander.remote import init_ras_worker, compute_parallel_remote

workers = [
    init_ras_worker("local", ras_version="6.5", num_cores=8),
    init_ras_worker("psexec", host="192.168.1.100", ...),
]
results = compute_parallel_remote(
    plan_number=["01", "02", "03", "04"],
    workers=workers
)

Documentation Sections

CLB Engineering Corporation  ·  LLM Forward Engineering
RAS Commander is a free and open-source project maintained by CLB Engineering Corporation. For agencies and firms seeking to modernize H&H workflows with LLM Forward approaches, contact CLB to partner with the engineers who wrote the automation.