Thread Subject: using new mpich2 library problems

Subject: using new mpich2 library problems

From: Brock

Date: 6 Nov, 2009 19:53:02

Message: 1 of 5

Hello,
We are trying to have matlab use a build of mpich2 that does not use smpd so we may use OSU's mpiexec in our PBS batch environment.

I built version 1.0.8p1 of mpich2 to match 1.0.x that comes with 2009a, I then made mpiLibConf.m to point to '/nobackup/brockp/matlab/mpich/lib/libmpich.so', and added its location to MATLABPATH,

I then made a configuration using the mpiexec type, and put in the custom mpiexec location, and argument --comm mpich2-pmi,

Problem is no matter what when I run
matlabpool open configname 4

The library that is dlopened()' is the one that comes with matlab (lsof | grep mpich), not my new one.
I am confused what needs to be done, or if there is anyway to make matlab give me more information about how it is picking what libmpich.so to load.

Any input would be helpful,

Subject: using new mpich2 library problems

From: Edric M Ellis

Date: 9 Nov, 2009 09:03:37

Message: 2 of 5

"Brock " <brockp@umich.edu> writes:

> Hello, We are trying to have matlab use a build of mpich2 that does not use
> smpd so we may use OSU's mpiexec in our PBS batch environment.
>
> I built version 1.0.8p1 of mpich2 to match 1.0.x that comes with 2009a, I then
> made mpiLibConf.m to point to '/nobackup/brockp/matlab/mpich/lib/libmpich.so',
> and added its location to MATLABPATH,
>
> I then made a configuration using the mpiexec type, and put in the custom
> mpiexec location, and argument --comm mpich2-pmi,
>
> Problem is no matter what when I run matlabpool open configname 4
>
> The library that is dlopened()' is the one that comes with matlab (lsof | grep
> mpich), not my new one. I am confused what needs to be done, or if there is
> anyway to make matlab give me more information about how it is picking what
> libmpich.so to load.

Once you've run "matlabpool open ...", what happens when you run

spmd
  which mpiLibConf
  [a, b] = mpiLibConf
end

?

How did you add the path to your updated mpiLibConf to MATLAB's path?

Cheers,

Edric.

Subject: using new mpich2 library problems

From: Brock

Date: 10 Nov, 2009 21:30:36

Message: 3 of 5


>
> Once you've run "matlabpool open ...", what happens when you run
When I do:
matlabpool open native-mpiexec 4
It says:
Starting matlabpool using the 'native-mpiexec' configuration ... connected to 1 labs.

Which is odd,
ps aux | grep mpiexec
/home/software/rhel5/mpiexec/0.83/bin/mpiexec --comm mpich2 -n 4 worker -parallel

Which is right, but:
lsof | grep mpich
MATLAB 31757 brockp mem REG 0,26 1353360 404096010 /afs/engin.umich.edu/caen/rhel_5/matlab-2009a/bin/glnxa64/libmpich.so

whcih mpiLibConf
/nobackup/brockp/matlab/mpiLibConf.m

>> spmd
which mpiLibConf
[a,b]=mpiLibConf
end
  1 /nobackup/brockp/matlab/mpiLibConf.m
    a =
    /nobackup/brockp/matlab/mpich/lib/libmpich.so
    b =
         {}

spmd
>
> spmd
> which mpiLibConf
> [a, b] = mpiLibConf
> end
>
> ?
>
> How did you add the path to your updated mpiLibConf to MATLAB's path?

export MATLABPATH=/nobackup/brockp/matlab:$MATLABPATH


>
> Cheers,
>
> Edric.

Subject: using new mpich2 library problems

From: Edric M Ellis

Date: 11 Nov, 2009 08:23:20

Message: 4 of 5

"Brock " <brockp@umich.edu> writes:

> When I do:
> matlabpool open native-mpiexec 4
> It says:
> Starting matlabpool using the 'native-mpiexec' configuration ... connected to 1 labs.
>
> Which is odd,

That's probably to do with the mismatch between the MPICH library you're picking
up and the mpiexec you're using. Typically, if something goes wrong there, each
worker process ends up thinking it's got labindex==1.

>>> spmd
> which mpiLibConf
> [a,b]=mpiLibConf
> end
> 1 /nobackup/brockp/matlab/mpiLibConf.m
> a =
> /nobackup/brockp/matlab/mpich/lib/libmpich.so
> b =
> {}
>

> [...]
>> How did you add the path to your updated mpiLibConf to MATLAB's path?
>
> export MATLABPATH=/nobackup/brockp/matlab:$MATLABPATH
>

Hmm, it does appear that the mpiLibConf.m being picked up by the workers is OK
when you've checked it there. But thinking about it, the worker path gets
modified after pool startup, so it may well not reflect the value that was
used. I'm not 100% sure if your workers will see the changes you've made via
setting the environment variable. Any chance you could try putting mpiLibConf.m
into ~/matlab ?

Cheers,

Edric.

Subject: using new mpich2 library problems

From: Brock

Date: 11 Nov, 2009 16:14:06

Message: 5 of 5

>
> Hmm, it does appear that the mpiLibConf.m being picked up by the workers is OK
> when you've checked it there. But thinking about it, the worker path gets
> modified after pool startup, so it may well not reflect the value that was
> used. I'm not 100% sure if your workers will see the changes you've made via
> setting the environment variable. Any chance you could try putting mpiLibConf.m
> into ~/matlab ?

That did it, things work correctly now, and torque starts matlab workers on the correct remote nodes, under the TM job manager, so nolonger use ssh, startup and shutdown is much cleaner and faster! Also nolonger have to leave a matlab running on a login node, which was the real goal.

Thank you!
Maybe make a note some place in the docs on mpiLibConf ?

>
> Cheers,
>
> Edric.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
parallel Brock 6 Nov, 2009 14:54:06
mpich2 Brock 6 Nov, 2009 14:54:06
mpilibconf Brock 6 Nov, 2009 14:54:06
pbs Brock 6 Nov, 2009 14:54:06
mpiexec Brock 6 Nov, 2009 14:54:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com