Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Creating and Running Jobs with a Local Scheduler
Date: Tue, 11 Nov 2008 08:43:01 +0000 (UTC)
Organization: RMIT
Lines: 54
Message-ID: <gfbgil$ert$1@fred.mathworks.com>
References: <gcl2cg$nh$1@fred.mathworks.com> <ytwd4i9hlyy.fsf@uk-eellis-deb4-64.mathworks.co.uk> <gcmk0j$56o$1@fred.mathworks.com> <gcmmm9$p98$1@fred.mathworks.com> <ytwprm9q65w.fsf@uk-eellis-deb4-64.mathworks.co.uk> <gcn420$s4u$1@fred.mathworks.com> <ytwljwwresa.fsf@uk-eellis-deb4-64.mathworks.co.uk> <gcp9bu$3qo$1@fred.mathworks.com> <ytwd4i5q7oz.fsf@uk-eellis-deb4-64.mathworks.co.uk>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226392981 15229 172.30.248.37 (11 Nov 2008 08:43:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 11 Nov 2008 08:43:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1372013
Xref: news.mathworks.com comp.soft-sys.matlab:500156


Edric M Ellis <eellis@mathworks.com> wrote in message <ytwd4i5q7oz.fsf@uk-eellis-deb4-64.mathworks.co.uk>...
> "Mr. CFD" <s2108860@student.rmit.edu.au> writes:
> 
> > Edric M Ellis <eellis@mathworks.com> wrote in message
> > <ytwljwwresa.fsf@uk-eellis-deb4-64.mathworks.co.uk>...
> > > That's good news. I'm not sure if you're already aware, but you do need to
> > > have the same version of MATLAB installed on your cluster too.
> > 
> > This must explain why I get the following error when the job was submitted to
> > the cluster. What are your thoughts?
> 
> Yes, that error is a consequence of sending a job from R2008b for execution
> under R2008a.
> 
> Cheers,
> 
> Edric.

Hi Edric,
Well we have finally got R2008b on the clusters and the simple (@rand) tutorial provided in the help file works fine,when submitting it to the cluster, unlike before when the two MATLAB versions were different.
Now I am trying to feed in my own function and have it submitted to the cluster. Have a very simple test.m model as below
=====================================================
function result=test(x)
y = x+2 ;
result = {y};
=======================================================
Using the following submit functions:

clusterHost = 'xxx.xxx.xxx';
remoteDataLocation = '/home/matlab/';
timeLimit = '00:02:00'; 
sched = findResource('scheduler', 'type', 'generic');
set(sched, 'DataLocation', 'C:\MATLAB')
set(sched, 'ClusterMatlabRoot', '/usr/local/matlab/R2008b');
set(sched, 'HasSharedFilesystem', true)
set(sched, 'ClusterOsType', 'unix');
set(sched, 'GetJobStateFcn', @pbsGetJobState);
set(sched, 'DestroyJobFcn', @pbsDestroyJob);
set(sched, 'SubmitFcn', {@pbsNonSharedSimpleSubmitFcn, timeLimit,clusterHost, remoteDataLocation});

j = createJob(sched)
createTask(j, @test, 1, {{1}  {3}});
submit(j)

waitForState(j)

results = getAllOutputArguments(j);

celldisp(results)
=======================================================
The clusters report no errors, but MATLAB window continues to display an 'Empty cell array: 1-by-0' for the results output.  Do you have any idea where the problem is?
Thanks