How to reset the 'default' RemoteClusterAccess object?

4 次查看(过去 30 天)
I have created a cluster object 'cluster' and job object 'j'. I accidentally selected the wrong key during my submission. Now when I try to resubmit an identical job, it remembers my past key. This happens when I have 1) created a new job, and 2) cleared the cluster object and created a new cluster object, and 3) restarted matlab, and 4) restated the client computer.
I finally moved the erroneously selected key to another location, only to get the following error when trying to submit the job:
>> submit(j)
Error using parallel.Job/submit (line 304)
Job submission failed because the user supplied IndependentSubmitFcn (independentSubmitFcn)
errored.
Caused by:
Error using parallel.cluster.RemoteClusterAccess.getConnectedAccessWithMirror (line 238)
The supplied identity file 'C:\this\is\a\fake\path\key.ppk' does
not exist.
How do I clear these credentials from being used by MATLAB (I'm using 2014a on Windows 8.1)?
I've also tried manually creating a new RemoteClusterAccess object and setting the job to use it (using the same procedure from this example), but the same problem happens.
  5 个评论
Brandon Barker
Brandon Barker 2014-9-23
The client OS is Windows 8.1, the server OS (which I guess doesn't really matter here) is CentOS 6.x.
I'm using some SLURM integration scripts which, incidentally, I heard you probably wrote (at least some version of) :). The Mathworks copyright on these files are mostly up to 2011 or 2012. In the README for that integration directory, I did see the following:
"If you need to change your credentials, you can reset them using the following command in the MATLAB command window: cluster.UserData.RemoteConnection.disconnect
You will be prompted to provide your credentials again when you next submit a job."
Unfortunately, I always have the following:
>> cluster.UserData
ans =
[]
This is true when I create the 'cluster' object using either the parcluster() along with a custom SLURM profile, or the following method (as outlined in the same README):
>> addpath(genpath('C:\Program Files\MATLAB\R2014a\toolbox\distcomp\examples\integration\slurm'))
>> cluster = parallel.cluster.Generic( 'JobStorageLocation', 'C:\TMP_MDCS');
clusterHost = '128.84.9.154';
remoteJobStorageLocation = '/tmp';
set(cluster, 'IndependentSubmitFcn', {@independentSubmitFcn, clusterHost, remoteJobStorageLocation});
set(cluster, 'GetJobStateFcn', @getJobStateFcn);
set(cluster, 'DeleteJobFcn', @deleteJobFcn);
set(cluster, 'CommunicatingSubmitFcn', {@communicatingSubmitFcn, clusterHost, remoteJobStorageLocation});
set(cluster, 'HasSharedFilesystem', false);
set(cluster, 'ClusterMatlabRoot', '/opt/apps/MATLAB/R2014a');
set(cluster, 'OperatingSystem', 'unix');
j = createJob(cluster)
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
j =
Job
Properties:
ID: 29
Type: independent
Username: brand_000
State: pending
SubmitTime:
StartTime:
Running Duration: 0 days 0h 0m 0s
AutoAttachFiles: true
Auto Attached Files: List files
AttachedFiles: {}
AdditionalPaths: {}
Associated Tasks:
Number Pending: 0
Number Running: 0
Number Finished: 0
Task ID of Errors: []
>> submit(j)
%
% At this point I get asked by a dialog titled "User Credentials":
% Does the identity file require a password?
%
% Typing in the password results in the following:
Error using parallel.Job/submit (line 304)
Job submission failed because the user supplied IndependentSubmitFcn (independentSubmitFcn) errored.
Caused by:
Error using parallel.cluster.RemoteClusterAccess.getConnectedAccessWithMirror (line 238)
Could not connect to remote host 128.84.9.154.
Error using parallel.cluster.RemoteClusterAccess/connect (line 351)
Could not connect session 128.84.9.154: .
Brandon Barker
Brandon Barker 2014-9-23
Another important point - the code I'm using seems to be heavily modified from SLURM integration scripts linked above. If you are interested, and let me know how I should distribute what I have, I'm happy to do so.

请先登录,再进行评论。

采纳的回答

Raymond Norris
Raymond Norris 2014-9-24
I thought that was where this might be going :) There should be a function, ClusterInfo. Call
>> ClusterInfo.state
Displayed, you should see PrivateKeyFile. To clear it, type
>> ClusterInfo.setPrivateKeyFile('')
The next time you submit a job, you'll be prompted for the new key file. Alternatively, you could just set it above to the new location and you won't be prompted.
The SLURM scripts are well outdated for R2012a+. I have the updated version in my sandbox, it's just making the time to publish them.
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Third-Party Cluster Configuration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by