<?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 How to parallelize the following code by OpenMP? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813205#M1075</link>
    <description>Furthermore, if the matrix is symmetric, additional operations are needed. The sequential version of code is as follows:&lt;BR /&gt;&lt;BR /&gt;do i=1,n ! matrix A is the size of n*n&lt;BR /&gt; y(i)=0.0d0&lt;BR /&gt;enddo&lt;BR /&gt;do 
i=1,nnz ! nnz is the number of entries of A&lt;BR /&gt; ii = irow(i) ! irow is
 the row number index of entries&lt;BR /&gt; jj = jcol(i) ! jcol is the column 
number index of entries&lt;BR /&gt; y(ii) = y(ii) + A(i)*x(jj)&lt;BR /&gt; if(issymmetric.and.ii/=jj)y(jj)=y(jj)+A(i)*x(ii)&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;How to parallelize the code by OpenMP?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Zhanghong Tang</description>
    <pubDate>Sun, 23 May 2010 22:20:47 GMT</pubDate>
    <dc:creator>Zhanghong_T_</dc:creator>
    <dc:date>2010-05-23T22:20:47Z</dc:date>
    <item>
      <title>How to parallelize the following code by OpenMP?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813204#M1074</link>
      <description>Dear all,&lt;BR /&gt;&lt;BR /&gt;The following code is used to calculate y = A * x as the function &lt;B&gt;mkl_?coogemv&lt;/B&gt;:&lt;BR /&gt;&lt;BR /&gt;do i=1,n ! matrix A is the size of n*n&lt;BR /&gt; y(i)=0.0d0&lt;BR /&gt;enddo&lt;BR /&gt;do i=1,nnz ! nnz is the number of entries of A&lt;BR /&gt; ii = irow(i) ! irow is the row number index of entries&lt;BR /&gt; jj = jcol(i) ! jcol is the column number index of entries&lt;BR /&gt; y(ii) = y(ii) + A(i)*x(jj)&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;Could anyone give me some suggestion about how to parallelize the code by OpenMP?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Zhanghong Tang&lt;BR /&gt;</description>
      <pubDate>Sun, 23 May 2010 00:19:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813204#M1074</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2010-05-23T00:19:19Z</dc:date>
    </item>
    <item>
      <title>How to parallelize the following code by OpenMP?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813205#M1075</link>
      <description>Furthermore, if the matrix is symmetric, additional operations are needed. The sequential version of code is as follows:&lt;BR /&gt;&lt;BR /&gt;do i=1,n ! matrix A is the size of n*n&lt;BR /&gt; y(i)=0.0d0&lt;BR /&gt;enddo&lt;BR /&gt;do 
i=1,nnz ! nnz is the number of entries of A&lt;BR /&gt; ii = irow(i) ! irow is
 the row number index of entries&lt;BR /&gt; jj = jcol(i) ! jcol is the column 
number index of entries&lt;BR /&gt; y(ii) = y(ii) + A(i)*x(jj)&lt;BR /&gt; if(issymmetric.and.ii/=jj)y(jj)=y(jj)+A(i)*x(ii)&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;How to parallelize the code by OpenMP?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Zhanghong Tang</description>
      <pubDate>Sun, 23 May 2010 22:20:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813205#M1075</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2010-05-23T22:20:47Z</dc:date>
    </item>
    <item>
      <title>How to parallelize the following code by OpenMP?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813206#M1076</link>
      <description>Your question is too general to give a definitive answer.&lt;BR /&gt;I suppose it's likely you might use such a scheme for packed storage of a symmetric matrix, where the submatrices associated with various values of i don't overlap. Then, you might start out with&lt;BR /&gt;!omp$ do parallel private(ii,jj) schedule(guided)&lt;BR /&gt; do 
i=1,nnz&lt;BR /&gt;...&lt;BR /&gt;You would likely find that it doesn't scale to all cores on a NUMA machine such as Nehalem or Opteron. Assuming that you keep the storage in a sane order (no skipping around with irow and jcol), you could throw on a static scheduled outer loop over the number of available threads, where you determine which range of i should be processed by each thread in order to balance the work.</description>
      <pubDate>Wed, 26 May 2010 18:32:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813206#M1076</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-05-26T18:32:26Z</dc:date>
    </item>
    <item>
      <title>How to parallelize the following code by OpenMP?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813207#M1077</link>
      <description>Hi Tim,&lt;BR /&gt;&lt;BR /&gt;Thanks for your kindly reply. I know that the sparse matrices are stored by CSR format and then the calculation was parallelized. However, since the MKL function &lt;B&gt;mkl_?coogemv &lt;/B&gt;is parallelized, I am wondering how does MKL parallelize this function.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Zhanghong Tang&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 May 2010 08:31:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/How-to-parallelize-the-following-code-by-OpenMP/m-p/813207#M1077</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2010-05-27T08:31:44Z</dc:date>
    </item>
  </channel>
</rss>

