Hi,
I would like to have a larger tag upper-bound, so I did the following:
int *maxval, flg;
static int newtag=100000;
void *pnew;
MPI_Attr_get(MPI_COMM_WORLD,MPI_TAG_UB,&maxval,&flg);
printf("TAG UB: %d\n", *maxval);
pnew = &newtag;
printf("new TAG UB: %d\n", newtag);
//MPI_Attr_put(MPI_COMM_WORLD,MPI_TAG_UB, pnew);
MPI_Comm_set_attr(MPI_COMM_WORLD,MPI_TAG_UB, pnew);
I can get the current tag upper-bound, which is 32767. But
both MPI_Attr_put() and MPI_Comm_set_attr() failed
with the error:
MPI_Gather: invalid key value (rank 0, MPI_COMM_WORLD)
Rank (0, MPI_COMM_WORLD): Call stack within LAM:
Rank (0, MPI_COMM_WORLD): - MPI_Comm_set_attr()
Rank (0, MPI_COMM_WORLD): - main()
Can anybody please show me the right way of increasing
tag upper-bound?
Thanks a lot in advance,
-Lei
|