Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Processes always rank 0
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-07-08 06:54:15


If you're just starting with MPI, is there any chance you can upgrade to Open MPI instead of LAM/MPI? All of the LAM/MPI developers moved to Open MPI years ago.

On Jul 8, 2010, at 6:01 AM, Oliver Stolpe wrote:

> Hello there,
>
> I have a problem setting up MPI/LAM. Here we go:
>
> I start lam with the lamboot command successfully:
>
> $ lamboot -v hostnames
>
> LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University
>
> n-1<11960> ssi:boot:base:linear: booting n0 (frost)
> n-1<11960> ssi:boot:base:linear: booting n1 (hurricane)
> n-1<11960> ssi:boot:base:linear: booting n2 (hail)
> n-1<11960> ssi:boot:base:linear: booting n3 (fog)
> n-1<11960> ssi:boot:base:linear: booting n4 (rain)
> n-1<11960> ssi:boot:base:linear: booting n5 (thunder)
> n-1<11960> ssi:boot:base:linear: finished
>
> Ok, all is fine. I test a command (hostname in this case):
>
> $ mpirun -v --hostfile hostnames hostname
> thunder
> rain
> frost
> fog
> hurricane
> hail
>
> Works. I write a hello world program for testing:
>
> #include <mpi.h>
> #include <stdio.h>
>
> int main(int argc, char** argv) {
> unsigned int rank;
> unsigned int size;
> MPI_Init(&argc, &argv);
>
> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
> MPI_Comm_size(MPI_COMM_WORLD, &size);
>
> printf("Hello, World. I am %u of %u\n", rank, size);
>
> MPI_Finalize();
> return 0;
> }
>
> I compile and run it:
>
> $ mpicc -o mpitest mpitest.c && mpirun -v --hostfile hostnames ./mpitest
> Hello, World. I am 0 of 1
> Hello, World. I am 0 of 1
> Hello, World. I am 0 of 1
> Hello, World. I am 0 of 1
> Hello, World. I am 0 of 1
> Hello, World. I am 0 of 1
>
> And I don't get it why everyone has the rank 0 and the size is only 1. I
> followed many tutorials and i proved it right many times. Does anyone
> has an idea?
>
> Thanks in advance!
>
> Oliver
>
> Some infos:
>
> $ lamboot -v
>
> LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University
>
> n-1<12088> ssi:boot:base:linear: booting n0 (localhost)
> n-1<12088> ssi:boot:base:linear: finished
> ocs_at_frost:~$ lamboot -V
>
> LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University
>
> Arch: x86_64-pc-linux-gnu
> Prefix: /usr/lib/lam
> Configured by: buildd
> Configured on: Sun Apr 6 01:43:15 UTC 2008
> Configure host: excelsior
> SSI rpi: crtcp lamd sysv tcp usysv
>
> $ mpirun -V
> mpirun (Open MPI) 1.2.7rc2
>
> Report bugs to http://www.open-mpi.org/community/help/
>
> $ mpicc -v
> Using built-in specs.
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian
> 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
> --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
> --enable-mpfr --enable-cld --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.3.2 (Debian 4.3.2-1.1)
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/