         for(int i = 0;i < depth; i++) 
         { 
             myKey[i] =   (aIndex+depth*tid + i < sizePerPartition ? A_keys  [myStartIdxA + aIndex+ depth*tid + i]   : MAX_VAL); 
-            myValue[i] = (aIndex+depth*tid + i < sizePerPartition ? A_values[myStartIdxA + aIndex+ depth*tid + i]   : MAX_VAL);	
+            myValue[i] = (aIndex+depth*tid + i < sizePerPartition ? A_values[myStartIdxA + aIndex+ depth*tid + i]   : UMAX_VAL);	
         }
     }	
 

            for(int i=0;i <depth;i++)
            {
                myKey[i]   = (aIndex+depth*tid+i   < partitionSizeA ? A_keys[myStartIdxA + aIndex + depth * tid + i]   : MAX_VAL);
                myValue[i] = (aIndex+depth*tid+i   < partitionSizeA ? A_values[myStartIdxA + aIndex + depth * tid + i]   : MAX_VAL);
            }
    
            if(tid == CTASIZE_simple-1)		

            for(int i=0;i <depth;i++)
            {
                myKey[i] = (aIndex+depth*tid + i   < localAPartSize  ? A_keys[myStartIdxA + aIndex+depth*tid+i]   : MAX_VAL);
                myVal[i] = (aIndex+depth*tid + i   < localAPartSize  ? A_vals[myStartIdxA + aIndex+depth*tid+i]   : UMAX_VAL);
            }
    
            if(tid == CTASIZE_multi-1)		
