Error: Failed to initialize the interactive session

32 次查看(过去 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
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
  6 个评论
Mohamad Chaban
Mohamad Chaban 2024-8-26
@Raymond Norris Hello Raymond
When I am using the "pctconfig" I am getting the following warning:
Warning: Ignoring request to change client session hostname to ******. The client session is
already using hostname ******, and will continue using that hostname for the duration of this
MATLAB session.
> In pctconfig>iCheckClientSessionHostname (line 276)
In pctconfig>iArgCheck (line 83)
In pctconfig (line 54)
Do you have an idea what may be the reason?
Raymond Norris
Raymond Norris 2024-8-26
Hi @Mohamad. You can set the hostname to either a new hostname or IP address until you call parpool. Once you've created the parallel pool (directly or indirectly), you can't change the hostname for that session of MATLAB. To do so, you'll need to restart MATLAB.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by