[mpich-discuss] A problem in running mpi code on ubuntu 13.10

ehsan saei ehsan.saei at gmail.com
Mon Jan 27 09:37:50 CST 2014

Dear MPI users,

Recently I moved to Ubuntu 13.10 and I got a problem with running my codes
on ubutnu 13.10.
After checking my code I tried to execute a hello world! code instead to
make sure that the problem is from mpi or not. Then I find that rank of all
processes is 0 and size is 1 independent from the number of processes that
I use with mpiexec.
herer is the code:

#include <mpi.h>
#include <iostream>
using namespace std;
int main(int argc ,char ** argv)

    int size,rank;

    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);


Is there any thing wrong with this code?

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140127/be9c77c9/attachment.html>

More information about the discuss mailing list