Okay, the problem is that you didn't configure OMPI to use PMI, and then ran your application using "direct launch" - i.e., starting it with srun instead of mpirun. So there is no way for the procs to obtain any information like their rank.
You need to add this to your OMPI configure line: --with-slurm=/home/frolo/local/slurm --with-pmi=/home/frolo/local/slurm On Jul 7, 2014, at 6:29 AM, Alexander Frolov <alexndr.fro...@gmail.com> wrote: > Ok, sorry. Here is the details: > > --- > hello.c > --- > #include <mpi.h> > #include <stdio.h> > #include <sys/utsname.h> > > int main(int argc, char **argv) > { > int myrank; > struct utsname unam; > > MPI_Init(&argc, &argv); > uname(&unam); > MPI_Comm_rank(MPI_COMM_WORLD, &myrank); > printf("Hello from rank %d on host %s\n", myrank, unam.nodename); > MPI_Finalize(); > > } > --- > srun -N 4 ./hello > > Hello from rank 0 on host A14 > Hello from rank 0 on host A12 > Hello from rank 0 on host A13 > Hello from rank 0 on host A11 > --- > OpenMPI configured as follows: > > ./configure --prefix=/home/frolo/local/openmpi-1.8.1-gcc-4.8.2 --with-openib > --enable-mpi-thread-multiple CC=/local/usr/local/bin/gcc > CXX=/local/usr/local/bin/g++ > --- > slurm configured as follows: > > ./configure --prefix=/home/frolo/local/slurm > > (I'm running it as a user) > --- > > > > On Mon, Jul 7, 2014 at 5:23 PM, Ralph Castain <r...@open-mpi.org> wrote: > With that little info, no - you haven't told us anything. How are you running > this "rank test", how was OMPI configured, etc? > > > On Jul 7, 2014, at 6:21 AM, Alexander Frolov <alexndr.fro...@gmail.com> wrote: > > > Hi! > > > > I am running MPI rank test using srun and all processes think that they are > > rank 0. > > > > * slurm 14.11.0-pre1 > > * openmpi-1.8.1 > > > > Any ideas what's wrong? > > > > Regards, > > Alex > > _______________________________________________ > > users mailing list > > us...@open-mpi.org > > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > > Link to this post: > > http://www.open-mpi.org/community/lists/users/2014/07/24753.php > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2014/07/24754.php > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2014/07/24755.php