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: Oliver Stolpe (oliver.stolpe_at_[hidden])
Date: 2010-07-08 09:03:30


You were right, it was linked to the lam compiler. I didn't find the
open mpi compiler on the system, though.
Now I downloaded and compiled the current stable version of openmpi.
That worked. I had to make symbolic links to the exectuables so that the
system won't get confused with the old mpi install that I can't access
to deinstall.

Now when I use my current host only as machine, it works:

$ mympicc mpitest.c -o mpitest && mympirun -np 3 -machinefile machines
mpitest
Hello, World. I am 2 of 3
Hello, World. I am 0 of 3
Hello, World. I am 1 of 3

To get it run on multiple machines, I had to give an absolute path to
the running binary:

/home/bude/ocs/openmpi/bin/mpirun -np 8 -machinefile machines mpitest

ocs_at_frost:~$ /home/bude/ocs/openmpi/bin/mpirun -np 8 -machinefile
machines mpitest
Hello, World. I am 4 of 8
Hello, World. I am 0 of 8
Hello, World. I am 7 of 8
Hello, World. I am 5 of 8
Hello, World. I am 1 of 8
Hello, World. I am 3 of 8
Hello, World. I am 2 of 8
Hello, World. I am 6 of 8

Yay! Works as it should (I think so, can I prove it somewhere that he
really executes the instances on the machines?)! Thanks everybody. This
is not the most elegant solution but it works eventually.

Best regards,
Oliver

Jeff Squyres (jsquyres) wrote:
> Lam and open mpi are two different mpi implementations. Lam came before open mpi; we stopped developing lam years ago.
>
> Lamboot is a lam-specific command. It has no analogue in open mpi.
>
> Orterun is open mpi's mpirun.
>
> >From a quick look at your paths and whatnot, its not immediately obvious how you are mixing lam and open mpi, but somehow you are. You need to disentangle them and entirely use open mpi.
>
> Perhaps your mpicc is sym linked to the lam mpicc (instead of the open mpi mpicc)...?
>
> -jms
> Sent from my PDA. No type good.
>
> ----- Original Message -----
> From: users-bounces_at_[hidden] <users-bounces_at_[hidden]>
> To: Open MPI Users <users_at_[hidden]>
> Sent: Thu Jul 08 06:13:43 2010
> Subject: Re: [OMPI users] Processes always rank 0
>
> I thought this is OpenMPI what I was using. I do not have permission to
> install something, only in my home directory. All tutorials I found
> started the environment with the lamboot command. Whats the difference
> using only OpenMPI?
>
> $ whereis openmpi
> openmpi: /etc/openmpi /usr/lib/openmpi /usr/lib64/openmpi /usr/share/openmpi
>
> $ echo $LD_LIBRARY_PATH
> :/usr/lib/openmpi/lib:/usr/lib64/openmpi/lib:
>
> $ whereis mpirun
> mpirun: /usr/bin/mpirun.mpich /usr/bin/mpirun /usr/bin/mpirun.lam
> /usr/bin/mpirun.openmpi
>
> $ ll /usr/bin/mpirun
> lrwxrwxrwx 1 root root 24 14. Aug 2008 /usr/bin/mpirun -> /usr/bin/orterun
>
> $ ll /usr/bin/orterun
> -rwxr-xr-x 1 root root 39280 25. Aug 2008 /usr/bin/orterun
>
> $ ll /usr/bin/mpirun.openmpi
> lrwxrwxrwx 1 root root 7 5. Sep 2008 /usr/bin/mpirun.openmpi -> orterun
>
> When I run mpirun without starting the environment by using lamboot, it
> says:
>
> ocs_at_frost:~$ mpicc -o mpitest mpitest.c && mpirun -np 1 -machinefile
> machines ./mpitest
> -----------------------------------------------------------------------------
>
> It seems that there is no lamd running on the host frost.
>
> This indicates that the LAM/MPI runtime environment is not operating.
> The LAM/MPI runtime environment is necessary for MPI programs to run
> (the MPI program tired to invoke the "MPI_Init" function).
>
> Please run the "lamboot" command the start the LAM/MPI runtime
> environment. See the LAM/MPI documentation for how to invoke
> "lamboot" across multiple machines.
> -----------------------------------------------------------------------------
>
> Thanks in advance,
> Oliver
>
>
> Jeff Squyres wrote:
>
>> 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.
>> ann/lib:/home/bude/ocs/fann
>>
>> 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
>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>