Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Parfor and clusters
Date: Mon, 17 Nov 2008 00:08:23 -0500
Organization: The MathWorks, Inc.
Lines: 53
Message-ID: <gfqu87$20v$1@fred.mathworks.com>
References: <gfkt1m$32n$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1226898503 2079 144.212.105.187 (17 Nov 2008 05:08:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 17 Nov 2008 05:08:23 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
Xref: news.mathworks.com comp.soft-sys.matlab:501157



"Scott " <crazyivan84__remove__@hotmail.com> wrote in message 
news:gfkt1m$32n$1@fred.mathworks.com...
> I'm trying to run a parfor loop on a cluster and am having a rough time. 
> There are two computers set up in my area, a dual-core and a single core 
> machine. One machine has a job manager running and two workers, the other 
> machine has a worker. Both have the parallel computing toolbox and 
> distcomp. R2008 is on both. All are running on a LAN on the same subnet. 
> The remote machine refuses to run anything. I think I'm missing a critical 
> bit of information, and the documentation or forums haven't helped me.
>
> My setup:
> - nodestatus shows both the remote machine and local machine connected to 
> the job manager.
> - nodestatus shows the two workers on the main machine and the single 
> worker on the remote machine are started.
> - I can connect to the job manager via findResource on both machines.
> - Both machines validate sucessfully in the configuration manager.
>
> What I've tried:
> - Running matlabpool on both machines with a jobmanager profile (files and 
> paths point to the same shared folder that contains the project code). 
> Both machines sucessfully download the folder when matlabpool starts.
> - Running matlabpool on both machines with a local profile (works great, 
> locally. Didn't expect otherwise).
> - When I run matlabpool <myjobmanager> a job is instantly sent to the job 
> manager and starts running, according to findResource. But it appears no 
> resources (memory, CPU) are consumed, and I am returned to the command 
> prompt.
>
> Hypothesis:
> My understanding is that the beauty of parfor loops is they should 
> automatically run across a cluster without needing to submit a job (given 
> that matlabpool is running). What am I missing? Am I misconfiguring 
> matlabpool?
>
> I've reached capitualtion after two full days and any help on the matter 
> would be delightful. Thanks in advance.

If I understand your third "What I've tried" statement correctly, I think 
you may have misunderstood what MATLABPOOL actually does.  MATLABPOOL 
doesn't run your PARFOR code; it just opens the pool.  Once the pool is 
open, you need to run your code that includes PARFOR on the machine where 
you executed the "matlabpool <myjobmanager>" command; when MATLAB reaches 
the PARFOR it will automatically make use of the pool that was opened by 
MATLABPOOL.  MATLABPOOL just makes the pool available; PARFOR actually makes 
your code "dive into" the pool.

-- 
Steve Lord
slord@mathworks.com