Commit bb755b5c authored by Wesley Bland's avatar Wesley Bland Committed by Pavan Balaji
Browse files

Moves the tag reservation to MPI layer



Resets MPIDI_TAG_UB back to 0x7fffffff. This value was changed a while back,
but the change should have happened at the MPI layer instead of the CH3 layer.
This resets the value to allow CH3 to use the tag space.

Instead, the value is now set in the MPI layer during initthread. This means
that it will be safe regardless of the device being used. This prevents a
collision that was occurring on the pamid device where the values for
MPIR_TAG_ERROR_BIT and the MPIR_Process.attr.tagged_coll_mask values were the
same.

Fixes #2008
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent ca2d0bca
......@@ -469,8 +469,10 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
/* Assert: tag_ub should be a power of 2 minus 1 */
MPIU_Assert(((unsigned)MPIR_Process.attrs.tag_ub & ((unsigned)MPIR_Process.attrs.tag_ub + 1)) == 0);
/* Set aside tag space for tagged collectives */
MPIR_Process.attrs.tag_ub >>= 1;
/* Set aside tag space for tagged collectives and failure notification */
MPIR_Process.attrs.tag_ub >>= 2;
/* The bit for error checking is set in a macro in mpiimpl.h for
* performance reasons. */
MPIR_Process.tagged_coll_mask = MPIR_Process.attrs.tag_ub + 1;
/* Assert: tag_ub is at least the minimum asked for in the MPI spec */
......
......@@ -123,7 +123,7 @@ typedef union {
* macros to set/access this bit are in src/include/mpiimpl.h. If the
* location of this bit changes, those macros also need to be adjusted.
*/
#define MPIDI_TAG_UB (0x3fffffff)
#define MPIDI_TAG_UB (0x7fffffff)
/* Provides MPIDI_CH3_Pkt_t. Must come after MPIDI_Message_match definition. */
#include "mpidpkt.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment