<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Catastrophic error while using _mm512_extload_epi32 in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005557#M31997</link>
    <description>&lt;P&gt;Dear experts,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I'm having some troubles while using the&amp;nbsp;&lt;/SPAN&gt;_mm512_extload_epi32&amp;nbsp;instrinsic. I want to load 16 signed char elements and convert them to int32 vector. The instruction is:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;___m512i v = m512_extload_epi32(buffer, _MM_UPCONV_EPI32_SINT8 , _MM_BROADCAST32_NONE, _MM_HINT_NONE ); //buffer is aligned to 16-bytes&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;When I compiled it, icc said "&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;catastrophic error: Invalid upconversion argument to intrinsic."&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;icc version 14.0.2 (gcc version 4.4.7 compatibility). MPSS version 3.1.4.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Can someone tell me where is the mistake?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Enzo&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 May 2014 14:44:39 GMT</pubDate>
    <dc:creator>Enzo_R_</dc:creator>
    <dc:date>2014-05-01T14:44:39Z</dc:date>
    <item>
      <title>Catastrophic error while using _mm512_extload_epi32</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005557#M31997</link>
      <description>&lt;P&gt;Dear experts,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I'm having some troubles while using the&amp;nbsp;&lt;/SPAN&gt;_mm512_extload_epi32&amp;nbsp;instrinsic. I want to load 16 signed char elements and convert them to int32 vector. The instruction is:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;___m512i v = m512_extload_epi32(buffer, _MM_UPCONV_EPI32_SINT8 , _MM_BROADCAST32_NONE, _MM_HINT_NONE ); //buffer is aligned to 16-bytes&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;When I compiled it, icc said "&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;catastrophic error: Invalid upconversion argument to intrinsic."&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;icc version 14.0.2 (gcc version 4.4.7 compatibility). MPSS version 3.1.4.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Can someone tell me where is the mistake?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Enzo&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 14:44:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005557#M31997</guid>
      <dc:creator>Enzo_R_</dc:creator>
      <dc:date>2014-05-01T14:44:39Z</dc:date>
    </item>
    <item>
      <title>Are the macros used defined?</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005558#M31998</link>
      <description>&lt;P&gt;Are the macros used defined? (iow you are missing a header or mistyped a parameter, or document incorrectly stating parameter)&lt;/P&gt;

&lt;P&gt;Insert before the offending line:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#if defined(_DEBUG)
_MM_UPCONV_EPI32_ENUM conv_ = _MM_UPCONV_EPI32_SINT8;
_MM_BROADCAST32_ENUM bc_ = _MM_BROADCAST32_NONE;
int hint_ = _MM_HINT_NONE;
#endif
&amp;nbsp;
&lt;/PRE&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 15:41:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005558#M31998</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-05-01T15:41:00Z</dc:date>
    </item>
    <item>
      <title>Yes, the macros are defined.</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005559#M31999</link>
      <description>&lt;P&gt;Yes, the macros are defined. I can print its values.&lt;/P&gt;

&lt;P&gt;Here is Intel documentation for _mm512_extload_epi32&amp;nbsp;=&amp;gt;&lt;A href="https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-5DA89227-25A6-49F5-975A-747822B2B6CE.htm"&gt;&amp;nbsp;https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-5DA89227-25A6-49F5-975A-747822B2B6CE.htm&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It seems for me that I'm not correctly using this function but I can't realize where is the mistake.&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 16:29:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005559#M31999</guid>
      <dc:creator>Enzo_R_</dc:creator>
      <dc:date>2014-05-01T16:29:01Z</dc:date>
    </item>
    <item>
      <title>I cannot re-create the error</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005560#M32000</link>
      <description>&lt;P&gt;I cannot re-create the error so it would be helpful to see other source code/usage details in a complete reproducer. Can you please post a complete reproducer?&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 16:48:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005560#M32000</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-05-01T16:48:02Z</dc:date>
    </item>
    <item>
      <title>Hi Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005561#M32001</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;

&lt;P&gt;Here is a complete reproducer:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;malloc.h&amp;gt;
#include &amp;lt;immintrin.h&amp;gt;
#include &amp;lt;omp.h&amp;gt;

#define SIZE 4096
#define NUM_THREADS 256
#define VECTOR_LENGTH 16

/************** MAIN *************/
int main(int argc, char *argv[]) {

	int i, iters, * a, *c;
	char * b;
		

	a = (int *) _mm_malloc(SIZE*sizeof(int), 64);
	b = (char *) _mm_malloc(SIZE*sizeof(char), 64);
	c = (int *) _mm_malloc(SIZE*sizeof(int), 64);

	for (i=0; i&amp;lt; SIZE ; i++) a&lt;I&gt; = 0;
	for (i=0; i&amp;lt; SIZE ; i++) b&lt;I&gt; = 'A';

	iters = SIZE / NUM_THREADS;
	
	#pragma offload target(mic) in(a: length(SIZE)) in(b:length(SIZE) align(16)) out(c: length(SIZE))
	#pragma omp parallel shared(iters) num_threads(NUM_THREADS) 
	{

		__declspec(align(64)) __m512i aux1, aux2, aux3;
// do C = A + B
		#pragma omp for schedule(dynamic)
		for (i=0; i &amp;lt; iters; i++) {
			aux1 = _mm512_extload_epi32(b+i*VECTOR_LENGTH, _MM_UPCONV_EPI32_SINT8 , _MM_BROADCAST32_NONE, _MM_HINT_NONE );
			aux2 = _mm512_load_epi32(a+i*VECTOR_LENGTH);
			aux3 = _mm512_add_epi32(aux1,aux2);
			_mm512_store_epi32(c+i*VECTOR_LENGTH,aux3);
		}
	}

	_mm_free(a); _mm_free(b); _mm_free(c);

	return 0;
}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 19:06:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005561#M32001</guid>
      <dc:creator>Enzo_R_</dc:creator>
      <dc:date>2014-05-01T19:06:57Z</dc:date>
    </item>
    <item>
      <title>Thank you. The error results</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005562#M32002</link>
      <description>&lt;P&gt;Thank you. The error results from the Xeon Phi™ intrinsic code being compiled for the host as part of the offload compilation for your offloaded code section. I believe you must do something like:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;#ifdef __MIC__
&amp;lt;existing Xeon Phi™ intrinsic code here&amp;gt;
#else
&amp;lt;host equivalent code here&amp;gt;
#endif&lt;/PRE&gt;

&lt;P&gt;However, I notice the code compiles without -openmp so perhaps as a work around try the structure above. Meanwhile, I will discuss this with the Developers.&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2014 19:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005562#M32002</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-05-01T19:33:00Z</dc:date>
    </item>
    <item>
      <title>I submitted this to</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005563#M32003</link>
      <description>&lt;P&gt;I submitted this to Development (see internal tracking id below) for further investigation. I believe the compiler should issue the same error both with and without &lt;STRONG&gt;-openmp&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200256211)&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2014 23:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005563#M32003</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-05-02T23:45:30Z</dc:date>
    </item>
    <item>
      <title>Hi Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005564#M32004</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I've tried your proposal but the compiler keeps saying the same. I'll wait for the fix. Thank you very much,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Enzo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 14:28:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005564#M32004</guid>
      <dc:creator>Enzo_R_</dc:creator>
      <dc:date>2014-05-06T14:28:39Z</dc:date>
    </item>
    <item>
      <title>There was an underlying</title>
      <link>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005565#M32005</link>
      <description>&lt;P&gt;There was an underlying defect associated with the compilation error that occurs when compiling with &lt;STRONG&gt;-openmp&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;That defect is now fixed in the latest &lt;STRONG&gt;Intel® Parallel Studio XE 2015 Update 1&lt;/STRONG&gt; release (2015.0.133 - Linux) and the code as written in your example now compiles with &lt;STRONG&gt;-openmp&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;You do have to be careful about the code as written. The error that occurred is actually correct and is issued when the Xeon Phi™ intrinsics (not valid for the host) are seen by the host compilation. In the current form, when offload is mandatory (the default), the Xeon&amp;nbsp; Phi™ intrinsics are not included within the host compilation; however, if the offload is made optional (say by adding an &lt;STRONG&gt;if &lt;/STRONG&gt;clause to the offload pragma), those intrinsics participate in the host compilation and will once again trigger the earlier compilation error. With offload optional, you must ensure the intrinsics are only active for the target compilation. One method for doing so is the &lt;STRONG&gt;__MIC__&lt;/STRONG&gt; predefine.&lt;/P&gt;

&lt;P&gt;For my earlier suggested use of &lt;STRONG&gt;__MIC__&lt;/STRONG&gt;, here is the placement inside the OMP loop that I used that worked:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;		#pragma omp for schedule(dynamic)
                for (i=0; i &amp;lt; iters; i++) {
#ifdef __MIC__
                printf("MIC\n");
                        aux1 = _mm512_extload_epi32(b+i*VECTOR_LENGTH, _MM_UPCON
V_EPI32_SINT8 , _MM_BROADCAST32_NONE, _MM_HINT_NONE );
                        aux2 = _mm512_load_epi32(a+i*VECTOR_LENGTH);
                        aux3 = _mm512_add_epi32(aux1,aux2);
                        _mm512_store_epi32(c+i*VECTOR_LENGTH,aux3);
#else
                printf("Place the HOST equivalent code here\n");
//                        c&lt;I&gt; = a&lt;I&gt; + b&lt;I&gt;;
#endif
                }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2014 20:28:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Catastrophic-error-while-using-mm512-extload-epi32/m-p/1005565#M32005</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-11-19T20:28:44Z</dc:date>
    </item>
  </channel>
</rss>

