Why does my Java code hang after the last statement when I try to deploy it using Parallel Computing Toolbox 4.2 (R2009b) and Builder JA 2.0.4 (R2009b)?

I am trying to deploy a MATLAB code that uses a jobmanager to submit a job to 2 workers. I am using MATLAB distributed Computing Server to accomplish this. When I compile this code using Builder JA and run it using my driver program, the program hangs after executing the last statement. The main function in Java code does not exit and waits indefinitely.

 采纳的回答

In order for deployed applications that use Parallel Computing Toolbox functions to terminate, the following function needs to be called after all the PCT functionality use is over or at the end of the MATLAB code.
pctRunDeployedCleanup
This function performs the necessary cleanup so that the client JVM can properly terminate when the deployed application exits.
For more information on this function, refer to the following link from the documentation:

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2009b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by