Project

General

Profile

Bug #4039

matlab actor always stops matlab process in wrapup

Added by Daniel Crawl about 10 years ago. Updated about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
actors
Target version:
Start date:
04/30/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4039

Description

The matlab actor always stops the matlab process when model execution ends. It would be nice if the actor could (optionally) keep it running. This functionality would be useful, for example, to continue displaying matlab plots after the model completes, or reuse the matlab process for subsequent model executions.

The difficulty in implementing this is knowing when to stop the matlab process. It should be done before the JVM exits. I don't think finalize() is a solution since it is not always called.

History

#1 Updated by Daniel Crawl about 10 years ago

In order for the matlab process to persist after model execution, an engine cannot be opened in an actor's thread.

http://www.mathworks.com/support/solutions/en/data/1-Z1Y34/ says:


The ability to open an instance of the MATLAB Engine in one thread and pass control of it to another thread is not available in MATLAB. When the thread that calls engOpen terminates, all resources for the Engine application also terminate. There are currently no known workarounds.


#2 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 4039

Also available in: Atom PDF