Clear Filters
Clear Filters

MATLAB并行计算箱无法启动

45 views (last 30 days)
晓翔 唐
晓翔 唐 on 17 Apr 2024
Answered: Kautuk Raj on 21 May 2024
错误使用 parallel.internal.pool.AbstractInteractiveClient>iThrowWithCause (第 305 行)
Failed to initialize the interactive session.
出错 parallel.internal.pool.AbstractInteractiveClient/start (第 142 行)
iThrowWithCause( 'parallel:convenience:FailedToInitializeInteractiveSession', err );
出错 parallel.internal.pool.AbstractClusterPool>iStartClient (第 831 行)
spmdInitialized = client.start(sessionBuildFcn, sessionInfo, numWorkers, cluster, ...
出错 parallel.internal.pool.AbstractClusterPool.hBuildPool (第 585 行)
iStartClient(client, sessionInfo, forceSpmdEnabled, cluster, supportRestart, argsList);
出错 parallel.internal.types.ValidationStages>iOpenPoolForCluster (第 456 行)
aPool = parallel.internal.pool.AbstractClusterPool.hBuildPool('Cluster', cluster, 'NumWorkers', numWorkers);
出错 parallel.internal.types.ValidationStages>@()iOpenPoolForCluster(runInfo)
出错 parallel.internal.types.ValidationStages>iCallWithNoHotlinks (第 336 行)
[varargout{1:nargout}] = fcn();
出错 parallel.internal.types.ValidationStages>iRunParpoolStage (第 247 行)
[commandWindowOutput, aPool] = evalc(iWrapForEvalc(openPoolFcn));
出错 parallel.internal.types.ValidationStages/run (第 68 行)
[eventData, runInfo] = obj.RunFunction(obj, runInfo);
出错 parallel.internal.validator.Validator/runValidationSuite (第 191 行)
[eventData, stageRunInfo] = currentStage.run(stageRunInfo);
出错 parallel.internal.validator.Validator/validate (第 103 行)
status = obj.runValidationSuite(profileName, suite);
出错 parallel.internal.ui.AbstractValidationManager/validate (第 36 行)
obj.Validator.validate(profileName, validationSuite);
出错 parallel.internal.ui.ValidationManager.validateProfile (第 36 行)
parallel.internal.ui.ValidationManager.getOrCreateInstance().validate(profileName, suite);
原因:
错误使用 parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (第 426 行)
The interactive communicating job failed with no message.

Answers (1)

Kautuk Raj
Kautuk Raj on 21 May 2024
I reckon that you encountered an error while trying to initialize an interactive session in the Parallel Computing Toolbox, leading to a failure in starting the client for your parallel pool.
I suggest the following steps to troubleshooting the issue:
  1. Check startup.m for any changes to the Java configuration and undo all such changes. You can refer to this MATLAB Answers post for details: https://www.mathworks.com/matlabcentral/answers/601714-why-is-startup-m-file-affecting-the-execution-of-parpool-command
  2. Make sure you are using the same version of Java for both compilation and execution. The following MATLAB Answers post can be referred to for more details: https://www.mathworks.com/matlabcentral/answers/130359-how-do-i-change-the-java-virtual-machine-jvm-that-matlab-is-using-on-windows
  3. Confirm that mex -setup is configured correctly.
I hope these steps will lead you to solving your issue.

Categories

Find more on 启动和关闭 in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!