From: Jose on 18 Mar 2010 13:58 Hello everyone, I am trying to tun an simple example to run in my cluster: bm-cluster1.sl.ac.ud that just has been installed MATLAB Distributed computing Server 4. Running the intrinsic function @rand, is fine, it works well: a=dfeval(@rand,{1,2,3,4,5},'lookupURL','bm-cluster1.sl.ac.ud') But, if I want to run another function, created by myself, with three imputs and 1 output: function meanx=averages(ini1,ini2,ini3) meanx=mean([ini1,ini2,ini3]); I try to run 4 task in the cluster as : [A B]=dfeval(@averages,{1 10 100 1000},{2 20 200 2000},{6 60 600 6000},'lookupURL','bm-cluster1.sl.ac.ud') and I got the next message error: "Warning: Errors occurred during execution of task 1. Results may be incorrect." Undefined function or method 'averages' for input arguments of type 'double'. It looks like to me that the cluster do not recognize my new function...anyone can help me with it...I don't have experience with Distributed Computer Server. Thnaks in advance, Jose.
From: Raymond Norris on 19 Mar 2010 08:50 Jose, You need to specifiy to dfeval that you have a file dependency on the file averages.m. Remember, the file is local to your MATLAB path, but the cluster knows nothing about the files on your client machine. When calling dfeval, use the FileDependencies argument. Raymond "Jose " <jose.l.vega(a)gmail.com> wrote in message <hntpjc$d24$1(a)fred.mathworks.com>... > Hello everyone, > I am trying to tun an simple example to run in my cluster: bm-cluster1.sl.ac.ud that > just has been installed MATLAB Distributed computing Server 4. > > Running the intrinsic function @rand, is fine, it works well: > a=dfeval(@rand,{1,2,3,4,5},'lookupURL','bm-cluster1.sl.ac.ud') > > But, if I want to run another function, created by myself, with three imputs > and 1 output: > function meanx=averages(ini1,ini2,ini3) > meanx=mean([ini1,ini2,ini3]); > > I try to run 4 task in the cluster as : > > [A B]=dfeval(@averages,{1 10 100 1000},{2 20 200 2000},{6 60 600 6000},'lookupURL','bm-cluster1.sl.ac.ud') > > and I got the next message error: > > "Warning: Errors occurred during execution of task 1. Results may be incorrect." > Undefined function or method 'averages' for input arguments of type 'double'. > > It looks like to me that the cluster do not recognize my new function...anyone can help me with it...I don't have experience with Distributed Computer Server. > > Thnaks in advance, > > Jose.
From: Jose on 19 Mar 2010 09:04 Ok, Raymond...I was thinking something like that...the problem is that the main program that I want to run in the cluster use 10 functions (created by myself)...and then I suppose I have to create an script to the cluster recognize all the 10 functions. We will see. Thanks a lot. Jose. "Raymond Norris" <raymond.norris(a)mathworks.com> wrote in message <hnvrue$1ol$1(a)fred.mathworks.com>... > Jose, > > You need to specifiy to dfeval that you have a file dependency on the file averages.m. Remember, the file is local to your MATLAB path, but the cluster knows nothing about the files on your client machine. > > When calling dfeval, use the FileDependencies argument. > > Raymond > > "Jose " <jose.l.vega(a)gmail.com> wrote in message <hntpjc$d24$1(a)fred.mathworks.com>... > > Hello everyone, > > I am trying to tun an simple example to run in my cluster: bm-cluster1.sl.ac.ud that > > just has been installed MATLAB Distributed computing Server 4. > > > > Running the intrinsic function @rand, is fine, it works well: > > a=dfeval(@rand,{1,2,3,4,5},'lookupURL','bm-cluster1.sl.ac.ud') > > > > But, if I want to run another function, created by myself, with three imputs > > and 1 output: > > function meanx=averages(ini1,ini2,ini3) > > meanx=mean([ini1,ini2,ini3]); > > > > I try to run 4 task in the cluster as : > > > > [A B]=dfeval(@averages,{1 10 100 1000},{2 20 200 2000},{6 60 600 6000},'lookupURL','bm-cluster1.sl.ac.ud') > > > > and I got the next message error: > > > > "Warning: Errors occurred during execution of task 1. Results may be incorrect." > > Undefined function or method 'averages' for input arguments of type 'double'. > > > > It looks like to me that the cluster do not recognize my new function...anyone can help me with it...I don't have experience with Distributed Computer Server. > > > > Thnaks in advance, > > > > Jose.
From: Raymond Norris on 19 Mar 2010 13:36 Jose, Here's an example using FD [A B]=dfeval(@averages, ... {1 10 100 1000},{2 20 200 2000},{6 60 600 6000}, ... 'lookupURL','bm-cluster1.sl.ac.ud', ... 'FileDependencies',{'averages.m','file2.m','file3.m','file4.m'}); Raymond "Jose " <jose.l.vega(a)gmail.com> wrote in message <hntpjc$d24$1(a)fred.mathworks.com>... > Hello everyone, > I am trying to tun an simple example to run in my cluster: bm-cluster1.sl.ac.ud that > just has been installed MATLAB Distributed computing Server 4. > > Running the intrinsic function @rand, is fine, it works well: > a=dfeval(@rand,{1,2,3,4,5},'lookupURL','bm-cluster1.sl.ac.ud') > > But, if I want to run another function, created by myself, with three imputs > and 1 output: > function meanx=averages(ini1,ini2,ini3) > meanx=mean([ini1,ini2,ini3]); > > I try to run 4 task in the cluster as : > > [A B]=dfeval(@averages,{1 10 100 1000},{2 20 200 2000},{6 60 600 6000},'lookupURL','bm-cluster1.sl.ac.ud') > > and I got the next message error: > > "Warning: Errors occurred during execution of task 1. Results may be incorrect." > Undefined function or method 'averages' for input arguments of type 'double'. > > It looks like to me that the cluster do not recognize my new function...anyone can help me with it...I don't have experience with Distributed Computer Server. > > Thnaks in advance, > > Jose.
From: Jose on 19 Mar 2010 14:11 Many thanks Raymond, but now I need to use a function that use a file library.mat in all the workers. To do it, I uploaded this file library.mat from my client machine into all the workers of my cluster via SSH client, in a directory called bm/home/jose.mat..I did it 8 times. My cluster have 16 processors. But now, I need the right sentence I have to use in your example...i am sure is load...but I do not know how I can get the right directory bm/home/jose.mat in the cluster from my client machine: Can you help me with that? Thanks in adavance. "Raymond Norris" <raymond.norris(a)mathworks.com> wrote in message <ho0cm4$isu$1(a)fred.mathworks.com>... > Jose, > > Here's an example using FD > > [A B]=dfeval(@averages, ... > {1 10 100 1000},{2 20 200 2000},{6 60 600 6000}, ... > 'lookupURL','bm-cluster1.sl.ac.ud', ... > 'FileDependencies',{'averages.m','file2.m','file3.m','file4.m'}); > > Raymond > > "Jose " <jose.l.vega(a)gmail.com> wrote in message <hntpjc$d24$1(a)fred.mathworks.com>... > > Hello everyone, > > I am trying to tun an simple example to run in my cluster: bm-cluster1.sl.ac.ud that > > just has been installed MATLAB Distributed computing Server 4. > > > > Running the intrinsic function @rand, is fine, it works well: > > a=dfeval(@rand,{1,2,3,4,5},'lookupURL','bm-cluster1.sl.ac.ud') > > > > But, if I want to run another function, created by myself, with three imputs > > and 1 output: > > function meanx=averages(ini1,ini2,ini3) > > meanx=mean([ini1,ini2,ini3]); > > > > I try to run 4 task in the cluster as : > > > > [A B]=dfeval(@averages,{1 10 100 1000},{2 20 200 2000},{6 60 600 6000},'lookupURL','bm-cluster1.sl.ac.ud') > > > > and I got the next message error: > > > > "Warning: Errors occurred during execution of task 1. Results may be incorrect." > > Undefined function or method 'averages' for input arguments of type 'double'. > > > > It looks like to me that the cluster do not recognize my new function...anyone can help me with it...I don't have experience with Distributed Computer Server. > > > > Thnaks in advance, > > > > Jose.
|
Pages: 1 Prev: Old Simulink Documentation Next: cognitive radio spectrum sensing |