The job_submission.py module#
Summary#
Resource requirements and scheduler-specific directives. |
|
Compute-node descriptor for distributed HFSS runs. |
|
HFSS-specific solver flags and environment settings. |
|
Complete, validated simulation configuration. |
Supported enterprise job schedulers. |
Convenience factory that hides all boilerplate and produces a |
Description#
job_submission — Cross-platform HFSS simulation runner with enterprise scheduler support#
This module provides a single entry point, create_hfss_config(), that
builds a validated, JSON-serialisable configuration object and submits it to
local subprocess (default)
SLURM
LSF (IBM Platform)
PBS / Torque
Windows HPC Server
The configuration is immutable (dataclass), validated on creation and can be round-tripped through JSON for persistence or REST transmission.
Examples#
Local simulation:
>>> cfg = create_hfss_config(
... ansys_edt_path="/ansys/v241/Linux64/ansysedt",
... jobid="patch_antenna",
... project_path="/home/antenna.aedt")
>>> result = cfg.run_simulation(timeout=3600)
>>> result.returncode
0
SLURM cluster:
>>> cfg = create_hfss_config(
... jobid="array_001",
... project_path="/shared/array.aedt",
... scheduler_type=SchedulerType.SLURM,
... scheduler_options=SchedulerOptions(
... queue="compute",
... nodes=4,
... memory="64GB",
... time="08:00:00"))
>>> job_id = cfg.run_simulation()
>>> print(job_id)
slurm_job_12345
Module detail#
- job_submission.create_hfss_config(project_path: str, jobid: str | None = '', ansys_edt_path: str | None = '', design_name: str | None = '', setup_name: str | None = '', machine_nodes: List[MachineNode] | None = None, scheduler_type: SchedulerType = SchedulerType.NONE, scheduler_options: SchedulerOptions | None = None, **kwargs) HFSSSimulationConfig#
Convenience factory that hides all boilerplate and produces a validated configuration in a single call.
- Parameters:
- ansys_edt_path
str,Optional Absolute path to
ansysedtexecutable. If not provided the latest installed version will be used.- jobid
str,Optional Unique job identifier (letters, digits,
_,-only).- project_path
str Absolute path to
.aedtor.aedbproject.- design_name
str,optional Design inside project. Default
""(active design).- setup_name
str,optional Setup name. Default
""(first setup).- machine_nodes
list[MachineNode],optional Compute nodes for MPI. Default
[MachineNode()].- scheduler_type
SchedulerType,optional External scheduler. Default
SchedulerType.NONE.- scheduler_options
SchedulerOptions,optional Scheduler directives. Default instance.
- **kwargs
Additional fields passed directly to
HFSSSimulationConfig.
- ansys_edt_path
- Returns:
HFSSSimulationConfigReady-to-run configuration.
Examples
>>> cfg = create_hfss_config( ... ansys_edt_path="/ansys/v241/Linux64/ansysedt", ... jobid="patch", ... project_path="/shared/patch.aedt", ... scheduler_type=SchedulerType.SLURM, ... scheduler_options=SchedulerOptions(nodes=4, memory="32GB"), ... ) >>> job = cfg.run_simulation()
- job_submission.logger#