calling icp.bat from matlab

5 years 11 months ago #238 by beguser

If I call icp.bat from within Matlab using Matlab's system command

status = system(;

the java process never really quits even after the icp solver finishes successfully. As a result, the Matlab script hangs. I plan to run a large number of sensitivity runs using comsol's matlab livelink. So this capability to terminate silently (without manually closing the comsol progress window) will be critical to my task. Is there any way the java job can terminate itself after a run is finished?


Please Log in or Create an account to join the conversation.

5 years 11 months ago #239 by bshafei
Replied by bshafei on topic calling icp.bat from matlab
Hello Alex,
You are right! In order to end task or process of iCP through MATLAB, you need to kill both java and comsol tasks. Killing solely the java process will not terminate iCP. As you previousely stated, this has to be done through the systems command in MATLAB. Then you have to use, taskill command to stop the execution of java and comsol processes.
taskkill [/s Computer] [/u Domain\User [/p Password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f][/t]

you have to choose any of the options of taskkill based on your application.

Comsol progress window you've mentioned is not related to the tasks running. You can deactivate it in your iCP json input file:
you need to change "showProgress":true to "showProgress":false

The following user(s) said Thank You: beguser

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds
Powered by Kunena Forum