- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
This code was working fine, till I changed something in some other file. Can someone please explain why am I getting this error and what does it mean?
error: this kind of pragma may not be used here
#pragma offload_transfer target(mic:0) nocopy( A: length(dim) alloc_if(0) free_if(1) )
^
So, instead I tried:
#pragma offload target(mic:0) nocopy( A: length(dim) alloc_if(0) free_if(1) )
{}
Now the error is:
internal error: assertion failed at: "shared/cfe/edgcpfe/ipragma_omp.c", line 4257
{}
^
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Difficult to say what the problem is without the source code. One possibility is that offload_transfer was added to some structure declared in an header file which is included your code.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I understand it is difficult without the source code. I just want some help understanding what this error means? why would the compiler determine that it can not transfer a char array to mic? I fail to imagine any situation where the compiler could possibly determine that a char array can not be transferred to mic.
And what does that second error "internal error: assertion failed..." mean?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am curious what version of the compiler you are using. I had had this "internal error" issue in an older version of the compiler (13.0.xxx). It was caused by offload pragmas with an empty body. The issue is fixed in more recent versions (version 13.1.1 does not have it for sure).
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
The internal error should never happen. It is not specific to any one error or condition. We need a reproducer to provide to Development so they can fix the root-cause or determine whether it is already fixed.
The initial error is not suggesting anything with respect to the array A. It is suggesting the placement of the pragma is not allowed so without some additional source context, as Ravi mentioned, the reason for it cannot be explained.
Can you provide a small reproducer or any additional source content that might permit us to create a reproducer?
You are using the Composer XE 2013 Update 2 (13.1.0.146) and could consider upgrading to Update 3 (13.1.1.163) to see whether the error is fixed in the newer release as Andrey found for his instance.
