Index: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu =================================================================== --- libomptarget/deviceRTLs/nvptx/src/data_sharing.cu +++ libomptarget/deviceRTLs/nvptx/src/data_sharing.cu @@ -380,7 +380,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]; @@ -453,7 +453,7 @@ // reclaim all outstanding global memory slots since it is // likely we have reached the end of the kernel. EXTERN void __kmpc_data_sharing_pop_stack(void *FrameStart) { - if (IsWarpMasterActiveThread()) { + if (getThreadId() % WARPSIZE == 0) { unsigned WID = getWarpId(); // Current slot