Index: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu =================================================================== --- libomptarget/deviceRTLs/nvptx/src/data_sharing.cu +++ libomptarget/deviceRTLs/nvptx/src/data_sharing.cu @@ -389,7 +389,7 @@ void *&FrameP = DataSharingState.FramePtr[WID]; // Only warp active master threads manage the stack. - if (IsWarpMasterActiveThread()) { + if (getThreadId() % WARPSIZE == 0) { // SlotP will point to either the shared memory slot or an existing // global memory slot. __kmpc_data_sharing_slot *&SlotP = DataSharingState.SlotPtr[WID]; @@ -468,7 +468,7 @@ return omptarget_nvptx_SimpleThreadPrivateContext::Deallocate(FrameStart); } - if (IsWarpMasterActiveThread()) { + if (getThreadId() % WARPSIZE == 0) { unsigned WID = getWarpId(); // Current slot