- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I need to offload a ZGEMM call to the xeon phi. Unfortunately, the compiler is complaining that "variable 'A' used in this offload region is not bitwise copyable". However, A is just a MKL_Complex16 pointer. So far the MKL_Complex16 type never gave me any problems.
Since MKL_Complex16 is just a plain struct with two doubles, the following explanation does not really apply: https://software.intel.com/en-us/articles/effective-use-of-the-intel-compilers-offload-features
void foo(MKL_Complex16 *A, MKL_Complex16 *B, MKL_Complex16 *C, ... some more arguments...) { //... some initialization ... alpha = MKL_Complex16 (sigma_1 / e, 0.0); beta = MKL_Complex16 (0.0, 0.0); const int matrix_elements = n*n; #pragma offload target(mic:0) \ in(A: length(matrix_elements) free_if(1)) \ in(B: length(matrix_elements) free_if(1)) \ in(C:length(matrix_elements)) \ out(C:length(matrix_elements) free_if(1)) zgemm("N", "N", &n, &n, &n, &alpha, (const MKL_Complex16*)(A), &n, (const MKL_Complex16*)B, &n, &beta, C, &n); //... something else ... }
What could be the problem here?
Thanks,
Paul
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The example I coded up does not produce any such warning/error so I'm not sure what I'm doing (or not) to match your snippet and am checking w/Development. Stay tuned....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development is also unable to reproduce this and I also tried compilers back to 13.1 without success in producing any compilation warning/error.
Can you please provide us with a reproducer that we can investigate further?
Also, please let us know the version of your compiler (icc -V -or- icpc -V)?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kevin, thanks for your help.
sorry for the mess up. As it turns out someone defined MKL_Complex16 to be complex<double>.
-- problem solved --
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thank you. Glad it was resolved.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page