Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] wrong rank and process number
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-10-22 16:55:29


Typically, when seeing errors like this, it can mean that you've got a
mismatch between the Open MPI that you compiled your application with,
the mpirun that you're using to launch the application, and/or
LD_LIBRARY_PATH to load the dynamic library libmpi.so (as Ralph stated/
alluded).

Ensure that you have an exact match between all three of these things:
compile your MPI app with the exact same version of Open MPI that you
use for mpirun to launch the app, and ensure that LD_LIBRARY_PATH is
pointing to the same libmpi.so (or the Right libmpi.so is in your
system's default linker search paths).

On Oct 22, 2009, at 4:48 PM, Ralph Castain wrote:

> If you google this list for entries about ubuntu, you will find a
> bunch of threads discussing problems on that platform. This sounds
> like one of the more common ones - I forget all the issues, but most
> dealt with ubuntu coming with a very old OMPI version on it, and
> issues with ensuring your path and ld_library_path are pointing to the
> correct distribution. Also believe there are issues with figuring out
> we are launching locally and other such things.
>
>
> On Oct 22, 2009, at 1:40 PM, Victor Rosas Garcia wrote:
>
> > Hello everybody,
> >
> > I have just installed openmpi v. 1.2.5 under ubuntu 8.04 and I have
> > compiled the following "hello world" program:
> >
> > ------start code------
> > #include <stdio.h>
> > #include <mpi.h>
> >
> > int main(int argc, char *argv[]){
> > int rank, size, len;
> > char hostname[256] = "";
> >
> > MPI_Init(&argc, &argv);
> > MPI_Comm_rank(MPI_COMM_WORLD, &rank);
> > MPI_Comm_size(MPI_COMM_WORLD, &size);
> > MPI_Get_processor_name(hostname, &len);
> >
> > printf("Hello World! I am %d of %d running on %s\n",
> > rank, size, hostname);
> >
> > MPI_Finalize();
> >
> > return 0;
> > }
> > ------end code------
> >
> > which I think is pretty basic stuff. Anyway, when I run it (single
> > node, three cores), I get the following output:
> >
> > mpiexec.openmpi -np 6 hello
> >
> > Hello World! I am 0 of 1 running on el-torito
> > Hello World! I am 0 of 1 running on el-torito
> > Hello World! I am 0 of 1 running on el-torito
> > Hello World! I am 0 of 1 running on el-torito
> > Hello World! I am 0 of 1 running on el-torito
> > Hello World! I am 0 of 1 running on el-torito
> >
> > where "el-torito" is the hostname. Shouldn't it be something like?:
> > Hello World! I am 0 of 6 running on el-torito
> > Hello World! I am 1 of 6 running on el-torito
> > Hello World! I am 2 of 6 running on el-torito
> > ...
> > etc.
> >
> > Any ideas as to why I keep getting wrong numbers for rank and number
> > of processes?
> >
> > Greetings from Monterrey, Mexico
> > --
> > Victor M. Rosas García
> > _______________________________________________
> > 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
>

-- 
Jeff Squyres
jsquyres_at_[hidden]