The job_submission.py module#

Summary#

SchedulerOptions

Resource requirements and scheduler-specific directives.

MachineNode

Compute-node descriptor for distributed HFSS runs.

HFSS3DLayoutBatchOptions

HFSS-specific solver flags and environment settings.

HFSSSimulationConfig

Complete, validated simulation configuration.

SchedulerType

Supported enterprise job schedulers.

create_hfss_config

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_pathstr, Optional

Absolute path to ansysedt executable. If not provided the latest installed version will be used.

jobidstr, Optional

Unique job identifier (letters, digits, _, - only).

project_pathstr

Absolute path to .aedt or .aedb project.

design_namestr, optional

Design inside project. Default "" (active design).

setup_namestr, optional

Setup name. Default "" (first setup).

machine_nodeslist[MachineNode], optional

Compute nodes for MPI. Default [MachineNode()].

scheduler_typeSchedulerType, optional

External scheduler. Default SchedulerType.NONE.

scheduler_optionsSchedulerOptions, optional

Scheduler directives. Default instance.

**kwargs

Additional fields passed directly to HFSSSimulationConfig.

Returns:
HFSSSimulationConfig

Ready-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#