<?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 copy from a global matrix to distributed matrix in Scalapack? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-copy-from-a-global-matrix-to-distributed-matrix-in/m-p/1639949#M36574</link>
    <description>&lt;P&gt;I would like to use pzhengst and others to solve an eigenvalue problem Ax=λBx. Thus, I need to copy from global A and B matrix to distributed ones. However, when calculating A and B, mpi_allreduce is used, so every process has the whole global A and B matrix.&lt;/P&gt;&lt;P&gt;I suppose in this case, zgebs2d and zgebr2d are inefficient, because there is no need for broadcasting? If this is the case, how should I copy from global A matrix to the distributed ones? Should I just pretend that A is a distributed matrix, like suggested in&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/gathering-distributed-matrix/m-p/885356" target="_self"&gt;this thread&lt;/A&gt;&amp;nbsp;, maybe by generating a context with nprow = npcol = 1, and then generating a desc with nb = n = lld?&lt;/P&gt;&lt;P&gt;Besides, what is the difference between&amp;nbsp;&lt;SPAN&gt;p?lacp2 and p?lacpy? I've checked their documentatino, and found no difference except for the direction of copy.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 10:02:58 GMT</pubDate>
    <dc:creator>jsjie</dc:creator>
    <dc:date>2024-10-29T10:02:58Z</dc:date>
    <item>
      <title>How to copy from a global matrix to distributed matrix in Scalapack?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-copy-from-a-global-matrix-to-distributed-matrix-in/m-p/1639949#M36574</link>
      <description>&lt;P&gt;I would like to use pzhengst and others to solve an eigenvalue problem Ax=λBx. Thus, I need to copy from global A and B matrix to distributed ones. However, when calculating A and B, mpi_allreduce is used, so every process has the whole global A and B matrix.&lt;/P&gt;&lt;P&gt;I suppose in this case, zgebs2d and zgebr2d are inefficient, because there is no need for broadcasting? If this is the case, how should I copy from global A matrix to the distributed ones? Should I just pretend that A is a distributed matrix, like suggested in&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/gathering-distributed-matrix/m-p/885356" target="_self"&gt;this thread&lt;/A&gt;&amp;nbsp;, maybe by generating a context with nprow = npcol = 1, and then generating a desc with nb = n = lld?&lt;/P&gt;&lt;P&gt;Besides, what is the difference between&amp;nbsp;&lt;SPAN&gt;p?lacp2 and p?lacpy? I've checked their documentatino, and found no difference except for the direction of copy.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 10:02:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-copy-from-a-global-matrix-to-distributed-matrix-in/m-p/1639949#M36574</guid>
      <dc:creator>jsjie</dc:creator>
      <dc:date>2024-10-29T10:02:58Z</dc:date>
    </item>
    <item>
      <title>Re:How to copy from a global matrix to distributed matrix in Scalapack?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-copy-from-a-global-matrix-to-distributed-matrix-in/m-p/1647421#M36713</link>
      <description>&lt;P&gt;Thank you for posting in the forum!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;One thing you could try is to use infog2l function like in the in-package examples (in the file matrix_generator.h). It is to loop over the global matrix and only copy the data to local when iarow==myrow and iacol==mycol. No communication is needed as all processes possess the whole A and B. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the difference between p?lacp2 and p?lacpy, the former requires that only one dimension of the matrix is distributed, that is the local columns of A are in the same process column or the local rows of A are in the same process row.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Fengrui&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Dec 2024 00:41:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-copy-from-a-global-matrix-to-distributed-matrix-in/m-p/1647421#M36713</guid>
      <dc:creator>Fengrui</dc:creator>
      <dc:date>2024-12-05T00:41:03Z</dc:date>
    </item>
  </channel>
</rss>

