<?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 Thank you Kevin.
	That works. in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002183#M30591</link>
    <description>&lt;P&gt;Thank you Kevin.&lt;BR /&gt;
	That works.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jul 2014 15:33:52 GMT</pubDate>
    <dc:creator>vincent_b_</dc:creator>
    <dc:date>2014-07-16T15:33:52Z</dc:date>
    <item>
      <title>Offload example in fortran</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002181#M30589</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying this simple fortran offload example and I don't understand why it gives me this error :&lt;/P&gt;

&lt;P&gt;main_offload1.f90(26): warning #8535: A procedure called in an OFFLOAD region must have the OFFLOAD:TARGET attribute. &amp;nbsp; [SQUAROOT]&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call squaroot(a,b,c,N)&lt;BR /&gt;
	-------------^&lt;BR /&gt;
	main_offload1.f90(26): warning #8535: *MIC* A procedure called in an OFFLOAD region must have the OFFLOAD:TARGET attribute. &amp;nbsp; [SQUAROOT]&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call squaroot(a,b,c,N)&lt;BR /&gt;
	-------------^&lt;/P&gt;

&lt;P&gt;Here is the code:&lt;/P&gt;

&lt;P&gt;!dir$ attributes offload:mic :: squaroot&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUBROUTINE squaroot(a,b,c,N)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; REAL, DIMENSION(N,N) :: a, b, c&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER :: N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DO j = 1, N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DO i = 1, N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j) = SQRT( b(i,j) * c(i,j) )&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; write (*,*) a(i,j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END DO&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END DO&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PROGRAM MAIN&lt;BR /&gt;
	!dir$ attributes offload:mic :: &amp;nbsp; a, b, c&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; REAL, DIMENSION(:,:), ALLOCATABLE :: a, b, c&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER :: N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N = 10&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLOCATE (a(N,N), b(N,N), c(N,N))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DO j = 1, N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DO i = 1, N&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c(i,j) = (i+j*N)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b(i,j) = c(i,j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END DO&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END DO&lt;BR /&gt;
	!dir$ offload target(mic) in(a,b:length(N*N)) inout(c:length(N*N))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call squaroot(a,b,c,N)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEALLOCATE (a,b,c)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/P&gt;

&lt;P&gt;Thanks you.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 15:20:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002181#M30589</guid>
      <dc:creator>vincent_b_</dc:creator>
      <dc:date>2014-07-16T15:20:08Z</dc:date>
    </item>
    <item>
      <title>You must to declare the</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002182#M30590</link>
      <description>&lt;P&gt;You must to declare the routine used within the offload region both at the point of definition and within the scope used. So, in the main program scope, add squaroot to attributes directive you already have.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 15:27:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002182#M30590</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-07-16T15:27:31Z</dc:date>
    </item>
    <item>
      <title>Thank you Kevin.
	That works.</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002183#M30591</link>
      <description>&lt;P&gt;Thank you Kevin.&lt;BR /&gt;
	That works.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 15:33:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-example-in-fortran/m-p/1002183#M30591</guid>
      <dc:creator>vincent_b_</dc:creator>
      <dc:date>2014-07-16T15:33:52Z</dc:date>
    </item>
  </channel>
</rss>

