diff --git a/packages/zoltan2/core/src/algorithms/Zoltan2_TPLTraits.hpp b/packages/zoltan2/core/src/algorithms/Zoltan2_TPLTraits.hpp index 40d4e82744b9..3291a10d621d 100644 --- a/packages/zoltan2/core/src/algorithms/Zoltan2_TPLTraits.hpp +++ b/packages/zoltan2/core/src/algorithms/Zoltan2_TPLTraits.hpp @@ -243,7 +243,13 @@ struct TPL_Traits { case 1: a = static_cast(b[0]); break; + case 2: + a = static_cast(b[0]); + if constexpr (sizeof(first_t) > sizeof(ZOLTAN_ID_TYPE)) + a += static_cast(b[1]) << (8*sizeof(ZOLTAN_ID_TYPE)); + break; default: + // CAG: This code path is pretty suspicous and caused issues when used for NUM_ID == 2. first_t *tmp = (first_t *) b; a = *tmp; }