Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Open MPI program cannot complete
From: Jack Bryan (dtustudy68_at_[hidden])
Date: 2010-10-24 17:43:39


Thanks for the reply. But, I use mpi_waitall() to make sure that all MPI communications have been done before a process call MPI_Finalize() and returns.
Any help is appreciated.
thanks
Jack
Oct. 24 2010

> From: gus_at_[hidden]
> Date: Sun, 24 Oct 2010 17:31:11 -0400
> To: users_at_[hidden]
> Subject: Re: [OMPI users] Open MPI program cannot complete
>
> Hi Jack
>
> It may depend on "do some things".
> Does it involve MPI communication?
>
> Also, why not put MPI_Finalize();return 0 outside the ifs?
>
> Gus Correa
>
> On Oct 24, 2010, at 2:23 PM, Jack Bryan wrote:
>
> > Hi
> >
> > I got a problem of open MPI.
> >
> > My program has 5 processes.
> >
> > All of them can run MPI_Finalize() and return 0.
> >
> > But, the whole program cannot be completed.
> >
> > In the MPI cluster job queue, it is strill in running status.
> >
> > If I use 1 process to run it, no problem.
> >
> > Why ?
> >
> > My program:
> >
> > int main (int argc, char **argv)
> > {
> >
> > MPI_Init(&argc, &argv);
> > MPI_Comm_rank(MPI_COMM_WORLD, &myRank);
> > MPI_Comm_size(MPI_COMM_WORLD, &mySize);
> > MPI_Comm world;
> > world = MPI_COMM_WORLD;
> >
> > if (myRank == 0)
> > {
> > do some things.
> > }
> >
> > if (myRank != 0)
> > {
> > do some things.
> > MPI_Finalize();
> > return 0 ;
> > }
> > if (myRank == 0)
> > {
> > MPI_Finalize();
> > return 0;
> > }
> >
> > }
> >
> > And, some output files get wrong codes, which can not be readible.
> > In 1-process case, the program can print correct results to these output files .
> >
> > Any help is appreciated.
> >
> > thanks
> >
> > Jack
> >
> > Oct. 24 2010
> >
> > _______________________________________________
> > 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