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: McCalla, Mac (macmccalla_at_[hidden])
Date: 2010-07-08 07:13:37


Hi Oliver,

Looks like you are mixing LAM and OpenMPI. Remove LAM from your environment (PATH, LD_LIBRARY_PATH or similar) and try again.

HTH,

Mac

>From my PDA: no type good....

----- Original Message -----
From: users-bounces_at_[hidden] <users-bounces_at_[hidden]>
To: users_at_[hidden] <users_at_[hidden]>
Sent: Thu Jul 08 05:01:00 2010
Subject: [OMPI users] Processes always rank 0

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

This e-mail and any attachments are for the sole use of the intended recipient(s) and may contain information that is confidential. If you are not the intended recipient(s) and have received this e-mail in error, please immediately notify the sender by return e-mail and delete this e-mail from your computer. Any distribution, disclosure or the taking of any other action by anyone other than the intended recipient(s) is strictly prohibited.