


{"id":47445,"date":"2020-08-18T14:41:28","date_gmt":"2020-08-18T14:41:28","guid":{"rendered":"\/forum\/forums\/topic\/how-to-change-the-job-file-name-of-files-generated-by-mechanical-input-file-ran-in-apdl\/"},"modified":"2020-08-18T14:41:28","modified_gmt":"2020-08-18T14:41:28","slug":"how-to-change-the-job-file-name-of-files-generated-by-mechanical-input-file-ran-in-apdl","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-change-the-job-file-name-of-files-generated-by-mechanical-input-file-ran-in-apdl\/","title":{"rendered":"How to change the job file-name of files generated by Mechanical input file ran in APDL"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Hi,<\/p>\n<p>I am running a simple structural problem in Ansys APDL, this is done in batch mode and the command is given in Matlab. I created the setup in Ansys Mechanical, and saved an input file which I am running in Matlab with:<\/p>\n<p><\/p>\n<\/p>\n<p>dos( &quot;C:Program FilesANSYS Incv195ansys\binwinx64ANSYS195.exe&quot; -b -i &quot;inputfilename.inp&quot; -o &quot;outputfilename.out&quot; -np 1 )<\/p>\n<p><\/p>\n<\/p>\n<p>I want to perform an optimization process in Matlab on this simulation (using fmincon). Currently I&#039;ve got this working correctly in serial mode. However, to speed up the optimization process, I want to perform this in parallel. The Matlab fmincon optimization solver is able to do this, and I already made sure that temporary input files are created for each evaluation (to prevent overwriting in parallel). However, somehow calling Ansys from Matlab in parallel mode does not work correctly. I get the error:<\/p>\n<p><\/p>\n<\/p>\n<p>&nbsp;*** ERROR *** Another ANSYS job with the same job name (file) is already running in this&nbsp;directory or the file.lock file has not been deleted from an abnormally&nbsp;terminated ANSYS run.&nbsp;To disable this check, set the ANSYS_LOCK environment&nbsp;variable to OFF.<\/p>\n<p><\/p>\n<\/p>\n<p>I suspect that the problem is that there is a set of automatically-generated job files in my working directory, all named &#039;file.*&#039; (including file.lock, see image below). In parallel these job files are used by multiple processes, which is not allowed. <\/p>\n<div class=\"embedExternal embedImage\">\n<div class=\"embedExternal-content\">\n<a class=\"embedImage-link\" href=\"https:\/\/us.v-cdn.net\/6032193\/uploads\/XRVJLP7PNAVQ\/capture-png.png\" rel=\"nofollow noopener\" target=\"_blank\"><br \/>\n<img decoding=\"async\" class=\"embedImage-img\" src=\"https:\/\/us.v-cdn.net\/6032193\/uploads\/XRVJLP7PNAVQ\/capture-png.png\" alt=\"Capture.PNG\" \/><br \/>\n<\/a><\/p>\n","protected":false},"template":"","class_list":["post-47445","topic","type-topic","status-closed","hentry","topic-tag-input-file","topic-tag-matlab","topic-tag-mechanical-apdl","topic-tag-species-transport-model"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["19646"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":["???C"],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["6563"],"_bbp_subscription":["254139"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["47445"],"_bbp_forum_id":["27791"],"_bbp_engagement":["200","180031"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["124916"],"_bbp_last_active_id":["124916"],"_bbp_last_active_time":["2020-08-20 11:18:15"]},"test":"koen_franse"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/47445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/47445\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=47445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}