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.

 採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 2 月 22 日
編集済み: MathWorks Support Team 2022 年 2 月 22 日
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