LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Neil Storer (Neil.Storer_at_[hidden])
Date: 2004-06-28 08:06:02


Lei,

Why do you need to identify the message so precisely? Why not just use "j"
for the tag (if "j" is the "inner loop"). You can pass the values "i" AND
"j" as values in the data, rather than the TAG.

The TAG is just to ensure that you can identify the message, without having
to read the data first. However if you absolutely have to identify the
message unequivocably, you would still have the "i" and "j" values passed as
part of the data.

Regards
          Neil

Lei_at_ICS wrote:
> Thanks a lot, Jeff!
>
> I was going to use tag until I realize that the tag
> space (number of usable values) is too small for my
> application.
>
> A message is identified uniquely by an integer pair
> (i, j), both i and j go from 0 to N-1. So the tag
> I use is: tag=i*N+j. This maps the two dimensional
> (i, j) space uniquely to the one dimensional tag
> space. Unfortunately, this solution limits the
> N value to sqrt(max_tag). Even if max_tag=MAX_INT,
> that's still not enough for me (N~=50k).
>
> One of the following could solve my problem:
> 1) A user adjustable max_tag, so I can set it to
> be MAX_INT^2;
> 2) A more efficient 2D -> 1D tag map so I won't
> waste the 1D tag space too much.
>
> Any suggestions?
>
> Thanks again
>
> -Lei
>
>
> On 6/27/04 11:45 AM, "Jeff Squyres" <jsquyres_at_[hidden]> wrote:
>
>
>>>It seems that this has to be true, but I just want to make sure that MPI
>>>has such a scheduling policy (FIFO?) between two processors. The reason
>>>for knowing that for sure is so I can avoid using message tags.
>>
>>You may want to reconsider that. Message tags are your friends -- they
>>can really help in terms of development, debugging, and ensuring that you
>>don't have difficult-to-diagnose race conditions later. It doesn't cost
>>much to post a few non-blocking receives on multiple tags and then using
>>MPI_Testany/MPI_Waitany to see if any of them have completed.
>
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/

-- 
+-----------------+---------------------------------+------------------+
| Neil Storer     |    Head: Systems S/W Section    | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF,          | email: neil.storer_at_[hidden]    |    //=\\  //=\\  |
| Shinfield Park, | Tel:   (+44 118) 9499353        |   //   \\//   \\ |
| Reading,        |        (+44 118) 9499000 x 2353 | ECMWF            |
| Berkshire,      | Fax:   (+44 118) 9869450        | ECMWF            |
| RG2 9AX,        |                                 |   \\   //\\   // |
| UK              | URL:   http://www.ecmwf.int/    |    \\=//  \\=//  |
+--+--------------+---------------------------------+----------------+-+
    | ECMWF is the European Centre for Medium-Range Weather Forecasts |
    +-----------------------------------------------------------------+