submit_job#

Desktop.submit_job(project_file: str | Path, cluster_name: str | None = None, aedt_full_exe_path: str | None = None, nodes: int | None = 1, cores: int | None = 32, wait_for_license: bool | None = True, setting_file: str | None = None) int#

Submit a job to be solved on a cluster.

Parameters:
project_filestr or pathlib.Path

Full path to the project.

cluster_namestr, optional

Name of the cluster to submit the job to.

aedt_full_exe_pathstr, optional

Full path to the AEDT executable file on the server. The default is None, in which case "/clustername/AnsysEM/AnsysEM2x.x/Win64/ansysedt.exe" is used. On linux this path should point to the Linux executable "ansysedt".

nodesint, optional

Number of nodes. The default is 1.

coresint, optional

Number of cores. The default is 32.

wait_for_licensebool, optional

Whether to wait for a license to become available. The default is True.

setting_filestr, optional

Job settings file. The file has the “*.areg” format. The default value is None in which case a default template will be used.

Returns:
int

ID of the job.

References

>>> oDesktop.SubmitJob

Examples

>>> from ansys.aedt.core import Desktop
>>> desktop = Desktop(version="2024.2")
Use template
>>> job_id1 = desktop.submit_job(
...     project_file="C:/projects/my_project.aedt",
...     cluster_name="my_cluster",
...     nodes=2,
...     cores=64,
... )
>>> job_id2 = desktop.submit_job(
...     project_file="C:/projects/my_project2.aedt", setting_file="my_settings_file.areg"
... )
>>> desktop.launch_job_monitor("C:/projects/my_project.aedt")