Newsgroups: comp.parallel.mpi
From: "Y. Hamadi" <hamadi@lirmm.fr>
Subject: Re: Installing MPI for Linux SMP?
Organization: LIRMM - FRANCE
Date: Thu, 23 Jul 1998 15:19:17 +0200
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="------------0221271684A2791E87A0A62E"
Message-ID: <35B73854.AF6C0FB8@lirmm.fr>


--------------0221271684A2791E87A0A62E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
Linux can be configured with a shared memory device, here is the solution (from
this newsgroup). Personnaly i'm using it with RedHat5.0 on a P200 notebook. As a
result, start-up time/execution time are faster than with a p4 configuration.
Nevertheless you should control the amount of shared memory/semaphores generated by
aborted execution (ipcs unix command).

============================================================================


Subject:      Guideline to configure MPICH with shmem on Linux
From:         Wolfram Webers <wwebers@cs.tu-berlin.de>
Date:         1998/06/23
Message-ID:   <358F7344.3AF3296@cs.tu-berlin.de>
Newsgroups:   comp.parallel.mpi
[More Headers]
[Subscribe to comp.parallel.mpi]

Ok, here's a small patch for mpich.

1. Edit the files

    mpid/ch_shmem/p2p_shmalloc.h

2. swap the lines:

/* Reluctant default: System V shared memory segments.  Look out for
ipcs. */
#if !defined(SHMEM_PICKED) && defined(HAVE_MMAP)
#    define USE_MMAP
#    define SHMEM_PICKED
#endif

/* If there is nothing special then we will use mmap if we have it. */
#if !defined(SHMEM_PICKED) && defined(HAVE_SHMAT)
#    define USE_SHMAT
#    define SHMEM_PICKED
#endif

into:

/* Reluctant default: System V shared memory segments.  Look out for
ipcs. */
#if !defined(SHMEM_PICKED) && defined(HAVE_SHMAT)
#    define USE_SHMAT
#    define SHMEM_PICKED
#endif

/* If there is nothing special then we will use mmap if we have it. */
#if !defined(SHMEM_PICKED) && defined(HAVE_MMAP)
#    define USE_MMAP
#    define SHMEM_PICKED
#endif

so on default the 'shmat' function is used.

3. If you like to use 'ch_lfshmem' you have to do so in ch_lfshmem

4. configure mpi with -device=ch_shmem or -device=ch_lfshmem

This was it. Note that you have to start your application now with

<appl> -np 2 ....

rather than with mpirun -np 2 <appl> ...

Ciao, Wolfram.
==================================================================================

Lars Rzymianowicz wrote:

> Shin-Cheng Mu wrote:
> > Has anyone ever successfully installed MPI for Linux SMP?
>
> There are hundreds of MPI-Linux-Cluster around ;-)
>
> > During configuration, I tried both configure -device=ch_shmem
> > and configure -device=ch_p4 -comm=shared . Both won't work, however.
> > Running any example results in a "semget failed" error:
>
> Unfortunately, MPICH under Linux can't be configured with the Shared
> Memory options. Look at the Install Guide, Linux chapter. This is based on
> a different mmap implementation by Linux.
>
> The funny thing is, we were able to run programs just with this configuration.
> We have 2 Dual-PentiumII PC's running:
>   lr@bonnie:/home/lr > uname -a
>   Linux bonnie 2.0.33 #7 Tue Jul 14 16:55:17 MEST 1998 i686 unknown
> with SMP option turned on and MPICH 1.1.1 installed.
> Here is our configure call:
>   # ./configure -arch=LINUX -comm=shared -device=ch_p4 -prefix=/opt/mpich-1.1.1
>   -cc=gcc -mpe -opt=-O2 -nodevdebug
> I just ran an app with 4 processes, two on each machine.
>
> Now my question is: Does Linux+MPICH(ch_p4, shared) only crash in special cases?
> Any Ideas?
>
> Lars
> --
> email: lr@mufasa.informatik.uni-mannheim.de
> Homepage: http://mufasa.informatik.uni-mannheim.de/lsra/persons/lars/



--
 Youssef HAMADI
  LIRMM - UMR 5506 CNRS/Universite Montpellier II
  161, Rue Ada  34392 MONTPELLIER CEDEX 5  FRANCE
  Tel: (+33) 04 67 41 86 13  Fax: (+33) 04 67 41 85 00
 http://www.lirmm.fr/~hamadi



--------------0221271684A2791E87A0A62E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Hi,
<BR>Linux can be configured with a shared memory device, here is the solution
(from this newsgroup). Personnaly i'm using it with RedHat5.0 on a P200
notebook. As a result, start-up time/execution time are faster than with
a p4 configuration. Nevertheless you should control the amount of shared
memory/semaphores generated by aborted execution (ipcs unix command).

<P>============================================================================
<BR>&nbsp;

<P>Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guideline to configure MPICH
with shmem on Linux
<BR>From:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wolfram Webers
&lt;wwebers@cs.tu-berlin.de>
<BR>Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1998/06/23
<BR>Message-ID:&nbsp;&nbsp; &lt;358F7344.3AF3296@cs.tu-berlin.de>
<BR>Newsgroups:&nbsp;&nbsp; comp.parallel.mpi
<BR>[More Headers]
<BR>[Subscribe to comp.parallel.mpi]

<P>Ok, here's a small patch for mpich.

<P>1. Edit the files

<P>&nbsp;&nbsp;&nbsp; mpid/ch_shmem/p2p_shmalloc.h

<P>2. swap the lines:

<P>/* Reluctant default: System V shared memory segments.&nbsp; Look out
for
<BR>ipcs. */
<BR>#if !defined(SHMEM_PICKED) &amp;&amp; defined(HAVE_MMAP)
<BR>#&nbsp;&nbsp;&nbsp; define USE_MMAP
<BR>#&nbsp;&nbsp;&nbsp; define SHMEM_PICKED
<BR>#endif

<P>/* If there is nothing special then we will use mmap if we have it.
*/
<BR>#if !defined(SHMEM_PICKED) &amp;&amp; defined(HAVE_SHMAT)
<BR>#&nbsp;&nbsp;&nbsp; define USE_SHMAT
<BR>#&nbsp;&nbsp;&nbsp; define SHMEM_PICKED
<BR>#endif

<P>into:

<P>/* Reluctant default: System V shared memory segments.&nbsp; Look out
for
<BR>ipcs. */
<BR>#if !defined(SHMEM_PICKED) &amp;&amp; defined(HAVE_SHMAT)
<BR>#&nbsp;&nbsp;&nbsp; define USE_SHMAT
<BR>#&nbsp;&nbsp;&nbsp; define SHMEM_PICKED
<BR>#endif

<P>/* If there is nothing special then we will use mmap if we have it.
*/
<BR>#if !defined(SHMEM_PICKED) &amp;&amp; defined(HAVE_MMAP)
<BR>#&nbsp;&nbsp;&nbsp; define USE_MMAP
<BR>#&nbsp;&nbsp;&nbsp; define SHMEM_PICKED
<BR>#endif

<P>so on default the 'shmat' function is used.

<P>3. If you like to use 'ch_lfshmem' you have to do so in ch_lfshmem

<P>4. configure mpi with -device=ch_shmem or -device=ch_lfshmem

<P>This was it. Note that you have to start your application now with

<P>&lt;appl> -np 2 ....

<P>rather than with mpirun -np 2 &lt;appl> ...

<P>Ciao, Wolfram.
<BR>==================================================================================

<P>Lars Rzymianowicz wrote:
<BLOCKQUOTE TYPE=CITE>Shin-Cheng Mu wrote:
<BR>> Has anyone ever successfully installed MPI for Linux SMP?

<P>There are hundreds of MPI-Linux-Cluster around ;-)

<P>> During configuration, I tried both configure -device=ch_shmem
<BR>> and configure -device=ch_p4 -comm=shared . Both won't work, however.
<BR>> Running any example results in a "semget failed" error:

<P>Unfortunately, MPICH under Linux can't be configured with the Shared
<BR>Memory options. Look at the Install Guide, Linux chapter. This is based
on
<BR>a different mmap implementation by Linux.

<P>The funny thing is, we were able to run programs just with this configuration.
<BR>We have 2 Dual-PentiumII PC's running:
<BR>&nbsp; lr@bonnie:/home/lr > uname -a
<BR>&nbsp; Linux bonnie 2.0.33 #7 Tue Jul 14 16:55:17 MEST 1998 i686 unknown
<BR>with SMP option turned on and MPICH 1.1.1 installed.
<BR>Here is our configure call:
<BR>&nbsp; # ./configure -arch=LINUX -comm=shared -device=ch_p4 -prefix=/opt/mpich-1.1.1
<BR>&nbsp; -cc=gcc -mpe -opt=-O2 -nodevdebug
<BR>I just ran an app with 4 processes, two on each machine.

<P>Now my question is: Does Linux+MPICH(ch_p4, shared) only crash in special
cases?
<BR>Any Ideas?

<P>Lars
<BR>--
<BR>email: lr@mufasa.informatik.uni-mannheim.de
<BR>Homepage: <A HREF="http://mufasa.informatik.uni-mannheim.de/lsra/persons/lars/">http://mufasa.informatik.uni-mannheim.de/lsra/persons/lars/</A></BLOCKQUOTE>
&nbsp;
<PRE>--&nbsp;
&nbsp;Youssef HAMADI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; LIRMM - UMR 5506 CNRS/Universite Montpellier II&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; 161, Rue Ada&nbsp; 34392 MONTPELLIER CEDEX 5&nbsp; FRANCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; Tel: (+33) 04 67 41 86 13&nbsp; Fax: (+33) 04 67 41 85 00
&nbsp;<A HREF="http://www.lirmm.fr/~hamadi">http://www.lirmm.fr/~hamadi</A></PRE>
&nbsp;</HTML>

--------------0221271684A2791E87A0A62E--


