Error: Failed to initialize the interactive session
조회 수: 148 (최근 30일)
이전 댓글 표시
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
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
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
댓글 수: 2
Michael Loibl
2023년 8월 1일
The suggestion with the pctconfig resolved it for me.
Is it possible to set the hostname permanently to the ip?
Or would it make more sense to change something on the cluster resp. the workers?
Raymond Norris
2023년 8월 1일
@Michael Loibl you have two options
- Add the pctconfig code in your startup.m file
- In R2023a, we changed the startup of the server socket to be on the cluster. It's possible this might work, without change, just out of the box. If you can, run R2023a to see if it works (without needing to call pctconfig).
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!