Optistruct automation
Hi all. I am working on an automation project. I want to kill an optistruct run. May I know what is the command to kill an optistruct run from python or tcl, or both if possible? Also, please note that there might be more than one optistruct run running simultaneously. So I want to kill just one of them and not all.
Please help ASAP.
Regards,
Rachit
Best Answer
-
Ah, ok, I see what is happening here, you are running the old NLGEOM subcase type, in this subcase the job is running Radioss, and OS is kind of suspended while this happens, to kill the subcase, in your case you can create a file Trial_Analysis_01_rad_s1_0001.ctl with the contents /KILL, then the osquit file Trial_Analysis_01.osquit will terminate the OS bit. In more recent versions of OS, I would suggest using a LGDISP subcase in place of NLGEOM.
0
Answers
-
I'm not sure if there is a specific way to kill a job like this, if you can write to the run directory though, you can create the file in the run folder with name <JOBNAME>.osquit (e.g. if the output file is my_run.out then this file should be my_run.osquit). Content of the file is irrelevant, it may be empty. That should stop the job.
0 -
Paul Sharp_21301 said:
I'm not sure if there is a specific way to kill a job like this, if you can write to the run directory though, you can create the file in the run folder with name <JOBNAME>.osquit (e.g. if the output file is my_run.out then this file should be my_run.osquit). Content of the file is irrelevant, it may be empty. That should stop the job.
Hi Paul. Thanks for your reply. I did create a .osquit file with name of current run but it did not kill the run. First I made a text file with name <my_current_job_name>.osquit. That did not work. Then I made a .osquit file with name <my_current_job_name>.osquit. But that too didn't work. May you please tell me if I am wrong anywhere?
Regards,
Rachit
0 -
Rachit Semalty said:
Hi Paul. Thanks for your reply. I did create a .osquit file with name of current run but it did not kill the run. First I made a text file with name <my_current_job_name>.osquit. That did not work. Then I made a .osquit file with name <my_current_job_name>.osquit. But that too didn't work. May you please tell me if I am wrong anywhere?
Regards,
Rachit
Not sure what is happening for you, I just tested again in latest version as I have not used it in a long while, and it worked fine, the file needs to be in the running directory of the job, i.e. below I created optimisationrun.osquit (empty file) and the model run stopped within a few seconds.
0 -
Paul Sharp_21301 said:
Not sure what is happening for you, I just tested again in latest version as I have not used it in a long while, and it worked fine, the file needs to be in the running directory of the job, i.e. below I created optimisationrun.osquit (empty file) and the model run stopped within a few seconds.
Hi Paul. I made a file like this:
And also like this:
But none of them worked. I am using 2017 optistruct solver and not compute console. Also, my analysis is NLGEOM. Are you able to identity any mistake I may be making?
Regards,
Rachit
0 -
Ah, I think maybe you have file extensions hidden in windows? It looks like what you may have done is create a file called FileName.osquit.txt and a file called FileName.osquit.osquit neither of those will work
It should just be FileName.osquit
0 -
Paul Sharp_21301 said:
Ah, I think maybe you have file extensions hidden in windows? It looks like what you may have done is create a file called FileName.osquit.txt and a file called FileName.osquit.osquit neither of those will work
It should just be FileName.osquit
Hi Paul. Thanks for your quick reply. Yes I had file extensions hidden. Now I checked show file extension option and have created the following file:
But it still does not work. Is any other error possible?
Regards,
Rachit
0 -
Can you share a sample model? Maybe there is something specific in your case, I have run a couple of test cases and osquit works for me each time.
0 -
Paul Sharp_21301 said:
Can you share a sample model? Maybe there is something specific in your case, I have run a couple of test cases and osquit works for me each time.
Yes sure.
0 -
Ah, ok, I see what is happening here, you are running the old NLGEOM subcase type, in this subcase the job is running Radioss, and OS is kind of suspended while this happens, to kill the subcase, in your case you can create a file Trial_Analysis_01_rad_s1_0001.ctl with the contents /KILL, then the osquit file Trial_Analysis_01.osquit will terminate the OS bit. In more recent versions of OS, I would suggest using a LGDISP subcase in place of NLGEOM.
0 -
Paul Sharp_21301 said:
Ah, ok, I see what is happening here, you are running the old NLGEOM subcase type, in this subcase the job is running Radioss, and OS is kind of suspended while this happens, to kill the subcase, in your case you can create a file Trial_Analysis_01_rad_s1_0001.ctl with the contents /KILL, then the osquit file Trial_Analysis_01.osquit will terminate the OS bit. In more recent versions of OS, I would suggest using a LGDISP subcase in place of NLGEOM.
Thanks for your reply. Yes it worked for my case. We will consider using LGDISP subcase in place of NLGEOM subcase.
Regards,
Rachit
0 -
Paul Sharp_21301 said:
Ah, ok, I see what is happening here, you are running the old NLGEOM subcase type, in this subcase the job is running Radioss, and OS is kind of suspended while this happens, to kill the subcase, in your case you can create a file Trial_Analysis_01_rad_s1_0001.ctl with the contents /KILL, then the osquit file Trial_Analysis_01.osquit will terminate the OS bit. In more recent versions of OS, I would suggest using a LGDISP subcase in place of NLGEOM.
Hi. I want to ask one more question. After killing the run, steps files are converted to .rst file and then to .h3d files. Is there any way I may stop this conversion as this causes memory issues sometimes?
Regards,
Rachit
0 -
the rst files and the h3d creation by hvtrans are both as a result of the NLGEOM (radioss) subcase, there is nothing you can do to stop them, the rst are not turned into h3d, it is the Annn files that are converted
0 -
attached is a running example for LGDISP (Non linear geometry in Optistruct, natively), I was able to run it in v2022
1 -
Paul Sharp_21301 said:
attached is a running example for LGDISP (Non linear geometry in Optistruct, natively), I was able to run it in v2022
Thanks for your help. It was helpful.
Regards,
Rachit
0