Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_ERR_TRUNCATE with MPI_Allreduce() error, but only sometimes...
From: Wei Hao (whao_at_[hidden])
Date: 2011-04-25 16:44:04


Hi:

I'm running openmpi 1.2.8. I'm working on a project where one part
involves communicating an integer, representing the number of data
points I'm keeping track of, to all the processors. The line is simple:

     MPI_Allreduce(&np,&geo_N,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);

where np and geo_N are integers, np is the result of a local
calculation, and geo_N has been declared on all the processors. geo_N is
nondecreasing. This line works the first time I call it (geo_N goes from
0 to some other integer), but if I call it later in the program, I get
the following error:

     [woodhen-039:26189] *** An error occurred in MPI_Allreduce
     [woodhen-039:26189] *** on communicator MPI_COMM_WORLD
     [woodhen-039:26189] *** MPI_ERR_TRUNCATE: message truncated
     [woodhen-039:26189] *** MPI_ERRORS_ARE_FATAL (goodbye)

As I understand it, MPI_ERR_TRUNCATE means that the output buffer is too
small, but I'm not sure where I've made a mistake. It's particularly
frustrating because it seems to work fine the first time. Does anyone
have any thoughts?

Thanks
Wei