Skip to content

OpenSees

OpenSees dataclass

OpenSees(name: str, script: str | Path, ranks: int = 1, executable: str | Path | None = None)

Run one Tcl model. Multi-rank execution needs a remote backend.

executable overrides the app or environment default for this task only. On a cluster, use a path visible and executable from every compute node.

Parameters:

Name Type Description Default
name str

Directory-safe task name.

required
script str | Path

Tcl path relative to the workflow workspace.

required
ranks int

Positive solver rank count; the local runner requires one.

1
executable str | Path | None

Executable override. Otherwise use FEMORA_OPENSEES, then OpenSees locally or OpenSeesMP with the backend.

None

Raises:

Type Description
ValueError

Name, script path, executable, or rank count is invalid.

TypeError

An executable override is not a string or Path.

Example
from femora.jobs.tasks import OpenSees
solve = OpenSees("solve", "build/model/model.tcl", ranks=98)
Note

This defines a task; it neither builds Tcl nor installs the solver. The example requires an allocation backend and an appropriate MPI build.

Attributes

cores property

cores: int

Reserved core slots, equal to the solver rank count.