MATLAB Answers

Error: Failed to initialize the interactive session

조회 수: 37(최근 30일)
pardhasai chadalavada
pardhasai chadalavada 2021년 5월 13일
답변: Raymond Norris 2021년 5월 14일
I am trying to validate a cluster profile. I was able to do all tests but the parallel pool test. I have attached my validation report below. Any help is appreciated.
VALIDATION REPORT
Profile: beoshock
Scheduler Type: Generic
Stage: Cluster connection test (parcluster)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:31 CDT 2021
Running Duration: 0 min 0 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: Job test (createJob)
Status: Passed
Start Time: Thu May 13 12:21:31 CDT 2021
Finish Time: Thu May 13 12:21:57 CDT 2021
Running Duration: 0 min 26 sec
Description:
Error Report:
Command Line Output:
Debug Log:
Stage: SPMD job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:21:59 CDT 2021
Finish Time: Thu May 13 12:22:37 CDT 2021
Running Duration: 0 min 38 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Pool job test (createCommunicatingJob)
Status: Passed
Start Time: Thu May 13 12:22:39 CDT 2021
Finish Time: Thu May 13 12:23:06 CDT 2021
Running Duration: 0 min 27 sec
Description: Job ran with 2 workers.
Error Report:
Command Line Output:
Debug Log:
Stage: Parallel pool test (parpool)
Status: Failed
Start Time: Thu May 13 12:23:08 CDT 2021
Finish Time: Thu May 13 12:24:41 CDT 2021
Running Duration: 1 min 33 sec
Description: Failed to initialize the interactive session.
Error Report: Failed to initialize the interactive session.
Caused by:
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (line 433)
The interactive communicating job errored with the following message: MatlabPoolPeerInstance{fLabIndex=1, fNumberOfLabs=2, fUuid=b10ec9e0-6fbc-43e5-8566-67ed5d06514d} was unable to find the host for MacBook-Pro:27370 due to a JVM UnknownHostException: null
  댓글 수: 1
Kojiro Saito
Kojiro Saito 2021년 5월 14일
It seems that you're trying to do parpool with MATLAB Parallel Server using Generic cluster profile.
parpool requires communication between remote servers and client PC, but you got UnknownHostException error which means a worker on remote servers cannot resolve the hostname of client PC.
Is the remote server (MATALB Parallel Server) in the same network of your client PC?

댓글을 달려면 로그인하십시오.

답변(1개)

Raymond Norris
Raymond Norris 2021년 5월 14일
Let me add to Kojiro's comment. Validation's last stage runs an interactive job with parpool. Look at the following graphic
Notice that the workers running on your cluster need to connect back to your desktop machine. The error you're seeing is that the workers can't "find" the client machine by the shortname. There are two options you can try
  • If your desktop is on the network (e.g. VPN), then before you call parpool, set the client hostname in MATLAB, as such:
ip = java.net.InetAddress.getLocalHost.getHostAddress().string
pctconfig('hostname',ip);
One thing to note: setting the hostname in pctconfig needs to be called before any calls to PCT (e.g. parfor, parpool, etc.)
  • Instead of a parallel pool, use a cluster pool with parforOptions. This will only work if you're calling parfor. For example:
c = parcluster;
opts = parforOptions(c);
parfor (idx = 1:100,opts)
A(idx,1) = rand;
end

Community Treasure Hunt

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

Start Hunting!

Translated by