手头上的项目用到了MIC,作为一个新的集成众核协处理器,它非常容易上手,对代码做很小的修改就能在MIC上跑出很好的效果。
今天调试程序时,出现了如下错误,在此处做个记录:
offload error :process on the device 0 was terminated by signal 11
网上很有太多资料,出现这种情况的原因可能很多。
逐句调试后发现我程序中的问题语句,
_mm512_store_epi32(void* mt, __m512i v1);
指针mt必须64位对齐。
附:
_mm512_store_epi32/_mm512_mask_store_epi32
Stores int32 vector. Corresponding instruction is VMOVDQA32. This intrinsic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).
Syntax
Without Mask extern void __cdecl _mm512_store_epi32(void* mt, __m512i v1); |
With Mask extern void __cdecl _mm512_mask_store_epi32(void* mt, __mmask16 k1, __m512i v1); |
Arguments
v1 | source vector to store elements from |
k1 | writemask |
mt | memory location to store vector elements (must be 64-byte aligned) |
Description
Stores 16 32-bit integer elements of int32 vector v1 to the memory address mt . The address mt must be 64-byte-aligned.
In the masked variant, only those elements with the corresponding bit set in vector mask k1 are stored to memory. Elements in the destination memory vector with the corresponding bit clear in k1 retain their previous value.
Returns
Returns nothing.