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