ansys / pymechanical

Pythonic interface to Ansys Mechanical ™
https://mechanical.docs.pyansys.com/
MIT License
38 stars 19 forks source link

Ansys pretends fatal error of AnsysWBU.exe on Linux #825

Closed Cpp87 closed 3 months ago

Cpp87 commented 3 months ago

🔍 Before submitting the issue

🐞 Description of the bug

running a pymechanical workflow on linux works until my last line. There, I have a log saying "personal script finished successfully". However, ansys does not shut down correctly. It informs me about a core-dump and fatal error. Notice that I run on linux but the print says AnsysWBU.exe, which must be wrong.

I am quite sure there is neither a core dump (no file present) nor a fatal error (script finishes until the end). But the return code to the operation system is != 0 which why my workflow crashes.

Here is the end of the log .... 2024-07-22 17:09:20.853919 [DESIGNSPACE, info]: DSCALAccessor::fileNew - Current version: ---- 2023 R2 (23.2) RELEASE ---- 2024-07-22 17:09:21.001832 [DESIGNSPACE, info]: CDSTreeRoot::fillBranchUnderProject - New Model created with ID: 10 2024-07-22 17:09:21.001894 [DESIGNSPACE, info]: CDSModel::addGeometryImportGroup - Geometry Import Group created with ID:11 2024-07-22 17:09:21.002050 [DESIGNSPACE, info]: CDSTreeRoot::createNecessaryModelChildren - Creating PrototypeGroup with ID: 12 2024-07-22 17:09:21.003254 [DESIGNSPACE, info]: CDSTreeRoot::createNecessaryModelChildren - Creating MeshControlGroup with ID: 13 2024-07-22 17:09:21.003373 [DESIGNSPACE, info]: CDSTreeRoot::createNecessaryModelChildren - Creating RemotePointGroup with ID: 14 2024-07-22 17:09:21.003469 [DESIGNSPACE, info]: CDSTreeRoot::createNecessaryModelChildren - Creating MaterialGroup with ID: 15 2024-07-22 17:09:21.003772 [DESIGNSPACE, info]: CDSModelAuto::AttachAssembly - Attaching the assembly 2024-07-22 17:09:21.003905 [DESIGNSPACE, info]: CDSModel::addCADMaterials Begin 2024-07-22 17:09:21.010901 [DESIGNSPACE, info]: CDSModel::addCADMaterials - No new materials loaded 2024-07-22 17:09:21.011298 [DESIGNSPACE, info]: CDSModel::addCADMaterials duration: 7 ms 2024-07-22 17:09:21.011459 [DESIGNSPACE, info]: CDSPrototypeGroup::setAssembly - Setting the assembly ID to: 1 2024-07-22 17:09:21.011497 [GRAPHICS, info]: CDSGfxController::setUserList_InitializeOnly duration: 0 ms 2024-07-22 17:09:21,641 INFO: personal script finished successfully


A fatal error has occurred within AnsysWBU.exe and it must be closed...


/share/hpc_apps/ansys/2023R2/v232/aisol/.workbench_lite: line 85: 611906 A

📝 Steps to reproduce

running a pymechanical workflow on LINUX

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

2023R2

🐍 Which Python version are you using?

3.10

📦 Installed packages

ansys-api-mechanical==0.1.0
ansys-api-platform-instancemanagement==1.0.0
ansys-dpf-core==0.12.2
ansys-mechanical-core==0.10.2
ansys-mechanical-env==0.1.7
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc3
ansys-tools-path==0.3.1
dipinknair commented 3 months ago

@Cpp87 , This is a known issue #85 happens when shutting down Mechanical in Linux (embedding). Does your workflow getting affected by this?

Note: Use .workbench instead of .workbench_lite when you use save-ansys-path command to save mechanical path.

Cpp87 commented 3 months ago

Yes it does, because I run the script as part of a jenkins pipeline and the return code of the stage is non-zero. Hence, the whole pipeline is then marked as "red", which is - in fact - not true. I have no way of detecting real errors. Ansys should return zero if it finishes without error. When will this bug be solved?

dipinknair commented 3 months ago

@Cpp87 Unfortunately it will only be fixed in Next release (25R1). @koubaa is there any workaround you can suggest for his issue?

koubaa commented 3 months ago

There's no workaround until the issue is fixed. Closing as a duplicate of #85