Re: Using 'Save' with DC Toolbox
- From: "Jos Martin" <jos.martin.nospam@xxxxxxxxxxxxx>
- Date: Tue, 16 Oct 2007 11:12:39 +0000 (UTC)
Alex,
Is it possible that your script (below) never gets to the
'save' command? The reason I ask is that there is no
OutputArguments property for a job, and in the line before
you call 'save' you say
output = get(jobz{i}, 'OutputArguments');
This will throw an error and save should never be called.
What I think you intended to call here is
output = getAllOutputArguements(jobz{i});
Also, note that there is no destroy method of a scheduler,
so the call at the bottom to
destroy(abc);
will also error, and isn't needed.
Hope this helps
Jos
"Alex Kloth" <akloth@xxxxxxxxx> wrote in message
<ff080c$1cm$1@xxxxxxxxxxxxxxxxxx>...
I'm currentlycomputing
running large-scale neural network simulations, and I'm using
distributed computing to make my computation time short.
However, I'd also like to get subsets of my results as they're
finishing. I was originally running a simple distributed
script to generate the results from a variety of datasets. Theincreasing network
variations in the data set consisted primarily of
sizes; as the network size increases, the computation timescales
considerably, as my code includes several matrixmultiplications and
transversions. This made it difficult for me to get outthe results
for the small networks while the larger networks werestill running.
running at
So, I created a program that would monitor several DC jobs
the same time, outputting the data from a single job whenthat job's
state was finished; I've amended this data to the end ofthis message.
However, when I go to use the 'save' function, my programterminates,
leaving me unable to deal with the rest of my data. Moreimportantly,
the save function fails, and I inadvertently destroy theresults I
just got.run all of my
I was wondering if there was a better way to do this: To
embarrasingly parallel distributed computing jobs at thesame time
while saving the data as the jobs finish without crashingthe program.
------jobz{i}.createTask(@zipser_rtrl,1,{data_Flex,setsize,m,C,nu,theta});
cd /home/alexk/backprop
load data_Flex_alt.mat
load data_Flex.mat
% C = zeros(1,20);
% C(1) = 1;
m = 2;
nu = 0.01;
theta = 0.005;
% setsize = [1,10];
abc = findResource('scheduler','type','generic');
abc.DataLocation = '/data/alexk/backprop';
abc.ClusterMatlabRoot = matlabroot;
abc.SubmitFcn = @pbsSubmitFunc;
get(abc)
jobz = {};
pd = {'/home/alexk/backprop'};
fd = {'zipser_rtrl.m'};
cellz = 10:5:50;
for i=1:length(cellz)
jobz{i} = abc.createJob;
set(jobz{i},'PathDependencies',pd);
set(jobz{i},'FileDependencies',fd);
for j=0:9
setsize = [j*10 + 1, (j+1) * 10];
C = eye(3,10+(i-1)*5);
jobz{i}.createTask(@zipser_rtrl,1,{data_Flex_alt,setsize,m,C,nu,theta});
endsave(['Flex_out_101407_',num2str(10+(i-1)*5),'.mat'],'output');
jobz{i}.submit;
end
flagz = zeros(1,length(cellz));
while sum(flagz) < length(cellz)
for i=1:length(cellz)
output = {};
if flagz(i) == 0
etat=get(jobz{i},'State');
if strcmp(etat,'finished');
output = get(jobz{i}, 'OutputArguments');
flagz(i) = 1;
end
end
end
end
if sum(flagz) == length(cellz)
for i=1:length(cellz)
destroy(jobz{i});
end
destroy(abc);
end
exit
.
- References:
- Using 'Save' with DC Toolbox
- From: Alex Kloth
- Using 'Save' with DC Toolbox
- Prev by Date: graph with time as x-axes
- Next by Date: 256*256 matrix
- Previous by thread: Using 'Save' with DC Toolbox
- Next by thread: OR operators
- Index(es):
Relevant Pages
|
Loading