[PyAEDT][PyAnsys] How to use submit_job function to work with Ansys Cloud
Hello, I am looking for some help regarding submitting jobs via PyAEDT/PyAnsys to the Ansys Cloud.
There is an issue with the command Hfss.submit_job (found here). Firstly, the arguments are not well defined (for example clustername is only defined as string, not the correct inputs for this string, any one know what correct inputs would look like?) in the documentation. Secondly, looking at the source code (script desktop.py) we saw that there are also other arguments that are not even mentioned in the documentation, like project_file. There are also no traceback errors calls to help. Here is the small code we have:
from pyaedt import Hfss
hfss = Hfss(r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt")
hfss.submit_job(project_file = r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt", clustername = "ansyscloud", aedt_full_exe_path = r"C:\Program Files\AnsysEM\v231\Win64\reg_ansysedt.exe",setting_file = r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Submit_Job_Settings_ANSYS_CLOUD_with_server.areg")
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: project_file = C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt
PyAEDT ERROR: clustername = ansyscloud
PyAEDT ERROR: aedt_full_exe_path = C:\Users\OVotsis\Downloads\Incident Wave Excitation.aedt
PyAEDT ERROR: numnodes = 1
PyAEDT ERROR: numcores = 32
PyAEDT ERROR: wait_for_license = True
PyAEDT ERROR: setting_file = C:\Users\OVotsis\Downloads\Submit_Job_Settings_CLOUDss.areg
PyAEDT ERROR: Check Online documentation on: https://aedt.docs.pyansys.com/version/stable/search.html?q=submit_job+project_file+clustername+aedt_full_exe_path+numnodes+numcores+wait_for_license+setting_file
False
If anyone has experience with the submit_job function for use with Ansys Cloud your help would be greatly appreciated. Also it there is any other way of using PyAEDT to submit a job to the cloud please let me know. Thank you for your time
Best Answer
-
Ansys cloud is not currently supported. Thanks to your feedback I've added this support to pyaedt.
I've created a new PR (Ansys cloud by maxcapodi78 · Pull Request #3223 · ansys/pyaedt (github.com)) and it will be soon in newer version of pyaedt.
I've also added some auxiliary methods to select the scheduler, get the config lists and download the files from the cloud.
Here a code snippet to use it.
I hope it helps.
Massimo
0
Answers
-
Hello, I am looking for some help regarding PyAEDT and job submission to the Ansys Cloud
There is an issue with the command Hfss.submit_job (found here). Firstly, the arguments are not well defined (for example clustername is only defined as string, not the correct inputs for this string, any idea what will those be?) in the documentation. Secondly, looking at the source code we saw that there are also other arguments that are not even mentioned in the documentation, like project_file. There are also no traceback errors calls to help. Here is the small code we have:
from pyaedt import Hfss
hfss = Hfss(r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt")
hfss.submit_job(project_file = r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt", clustername = "ansyscloud", aedt_full_exe_path = r"C:\Program Files\AnsysEM\v231\Win64\reg_ansysedt.exe",setting_file = r"C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Submit_Job_Settings_ANSYS_CLOUD_with_server.areg")
This makes the following error:
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: project_file = C:\Users\OVotsis\Downloads\Incident Wave Excitation Folder\Incident Wave Excitation.aedt
PyAEDT ERROR: clustername = ansyscloud
PyAEDT ERROR: aedt_full_exe_path = C:\Program Files\AnsysEM\v231\Win64\reg_ansysedt.exe
PyAEDT ERROR: numnodes = 1
PyAEDT ERROR: numcores = 32
PyAEDT ERROR: wait_for_license = True
PyAEDT ERROR: setting_file = C:\Users\OVotsis\Downloads\Submit_Job_Settings_CLOUDss.areg
PyAEDT ERROR: Check Online documentation on: https://aedt.docs.pyansys.com/version/stable/search.html?q=submit_job+project_file+clustername+aedt_full_exe_path+numnodes+numcores+wait_for_license+setting_file
False
If anyone has any idea about how to properly set arguments on the submit_job function it would be of great help. Also if there are any other ways to submit a job to the Ansys cloud via PyAEDT please let me know. Thank you for your time!
0