TAGGED: ansys-apdl, mechanical, upf, usermat, usermat-coding
-
-
July 20, 2023 at 9:07 amjanot.lubritzSubscriber
Hey guys!
I am trying to include USERMAT files in my Ansys code via the dynamic library linking option. I did everything as described in the manual (ANS_USER_PATH is set, USERMAT.F and ANSUSERSHARED.bat are in the folder and did compile, the output window shows that ANSYS is linked by licensee) but everytime I run my APDL code (which works without the USERMAT) the run terminates abnormally and the window closes without any message. When I restart APDL it says:
*** ERROR ***
Another ANSYS job with the same job name (dll_UPF_Check_20072023) is already running in this
directory or the dll_UPF_Check_20072023.lock file has not been deleted from an abnormally
terminated ANSYS run. To disable this check, set the ANSYS_LOCK environment
variable to OFF.Do you wish to override this lock and continue (y or n)?
I checked the .lock file but it's empty and I have no idea what could be the problem. I know that the USERMAT works since I linked it via the new .exe linking option but I want to switch to the .dll linking option.
Does anybody have an idea on what could be the problem? I run Mechanical APDL 2022R1 on Windows 10.
Thanks a lot in advance!
-
July 22, 2023 at 12:53 ammjmiddleAnsys Employee
I’m just adding my two cents since I don’t work with the UPF, but I can tell you that the .lock file is always an empty file. It’s presence is just used to indicate whether the previous Ansys session ended abnormally, in which case it would produce the error you pasted. You can just type “y” to override the previous lock and continue launching Ansys. Or just delete the .lock file before launching Ansys, and it will launch normally, without any recognition of the previous abrupt exit.
Is there anything relevant to the crash left in the .err file?
-
July 25, 2023 at 7:37 amjanot.lubritzSubscriber
Thanks for the response. There are some warnings in the .err file but they’re all related to the model and not the “solver” itself. I cannot find anything that would lead to a total crash and not just an error prompt during the solving provess.
I know that I can override or delete the lock file but when I try to run it again APDL crashes again...
The same model does run with the USERMAT linked via the .exe file so I know that it does run through. I just have no clue why the linking with the dll library does not work. When I compile files beforehand with ansusershared.bat it does create dll and other files but the linking to APDL with the system variable ANS_USER_PATH somehow does not work (even though it says in the command prompt: This version is linked by licensee).
-
July 25, 2023 at 1:26 pmjanot.lubritzSubscriber
Update: I figured that it does not crash when I use the original Ansys folder for the compilation (C:\Program Files\ANSYS Inc\v221\ansys\custom\user\winx64) and switch my ANS_USER_PATH variabel to the same folder. It says everywhere that any folder can be used for the compilation as long as the ansusershared.bat and the usermat.f are existant. Looks like that is not the case but everything is working now.
-
-
- The topic ‘UPF dynamic library ansys terminates abnormally’ is closed to new replies.
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- How to apply Compression-only Support?
- Geometric stiffness matrix for solid elements
- Frictional No separation contact
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
-
1421
-
599
-
591
-
565
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.