From: Jose on
Hello everyone, when I tray to run my function jose.m in the cluster from the main program in my laptop, it works using this structure:

Main program

....
....
....

% calculating jose.m in the server bm-cluster1.nsl.as.ud

jm=findresource('jobmanager','LookupURL','bm-cluster1.nsl.as.ud') ;

pjob=createJob(jm);
set(pjob,'FileDependencies',{'jose.m','maxind.m'});
set(pjob,'Name',('Jose joint info'));
set(pjob, 'MaximumNumberOfWorkers',1);

NW=1;
obj=cell(1,NW);

for n=1:NW
load C:/Users/jlvega/Documents/MATLAB/data.mat
obj{n}=createTask(pjob,'joser',6,{data 25000 'yes'});



end

submit(pjob);
waitForState(pjob);

out=getAllOutputArguments(pjob)
------------------------------------------------------------

My problem is, the function "jose" running in the cluster need variables from the main program (m1 m2 m3 m4 m5 ) in my laptop,

how can I send the variables from my main program to the function jose.m running in the cluster?, there some command like global m1 m2 m3 m4 m5...that need to be specified in the above structure.

Thanks in advance,

Jose.
From: Edric M Ellis on
"Jose " <jose.l.vega(a)gmail.com> writes:

> Hello everyone, when I tray to run my function jose.m in the cluster
> from the main program in my laptop, it works using this structure:
> [...]
>
> My problem is, the function "jose" running in the cluster need
> variables from the main program (m1 m2 m3 m4 m5 ) in my laptop,
>
> how can I send the variables from my main program to the function
> jose.m running in the cluster?, there some command like global m1 m2
> m3 m4 m5...that need to be specified in the above structure.

How does "jose.m" rely on m1...m5? Can't you simply make them be input
arguments to the function? It will not work to specify m1...m5 as
"global" on your laptop, as the global workspace is not shared with the
cluster.

Cheers,

Edric.
 | 
Pages: 1
Prev: help with dsolve
Next: i wanna multiply two image