This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The issue of libgomp on MIC


On Tue, Jun 23, 2015 at 05:33:09PM +0800, Stephen Wang wrote:
> Hi Thomas,
> 
> Thanks a lot for your quick response :-)
> 
> The attachment is the kernel benchmark I used.

You invoke undefined behavior.  See OpenMP 4.0, page 82, lines 9-10:
"If the corresponding list item is not present in the device data
environment, the behavior is unspecified."

That is the case, while the base variables of the array sections are mapped,
the array sections themselves are not mapped.

I bet you or the testcase author meant to use
#pragma omp target data map(to:rowStart[0:(r+2)], matVal[0:(nnz+2)], col[0:(nnz+2)], vecVal[0:(r+2)], r, s, t) map(from: retVal[0:(r+2)])
instead of the:
#pragma omp target update to(rowStart[0:(r+2)], matVal[0:(nnz+2)], col[0:(nnz+2)], vecVal[0:(r+2)], r, s, t) from(retVal[0:(r+2)])

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]