<?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 Re: sorted compressed sparse row matrix in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866463#M8036</link>
    <description>&lt;BR /&gt;
&lt;P&gt;Hi,&lt;BR /&gt;1.MKL contains such routine internally but this routine is not declared externally.&lt;BR /&gt;2. As a temporarily workaround for sorting the column indexes you can usemkl_dcsradd(...) or mkl_dcsrmultcsr(...) routines ( see the description of these functions into &lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="mk:@MSITStore:C:AppsIntelMKL10.1docmklman.chm::/bla/bla_SBLAS2-3_routines.html"&gt;Sparse BLAS Level 2 and Level 3 Routines.&lt;/A&gt;)&lt;/SPAN&gt;&lt;BR /&gt;Please pay attention on parameter "sort" which specifies the type of reordering.&lt;BR /&gt;namely:&lt;BR /&gt;sort: If this parameter is not set (default), the routine does not perform reordering. If sort&lt;SAMP&gt;=1&lt;/SAMP&gt;, the routine arranges the column indices ja for each row in the increasing order and reorders the corresponding values of the matrix &lt;VAR&gt;A&lt;/VAR&gt; in the array a. If sort&lt;SAMP&gt;=2&lt;/SAMP&gt;, the routine arranges the column indices jb for each row in the increasing order and reorders the corresponding values of the matrix &lt;VAR&gt;B&lt;/VAR&gt; in the array b.If sort&lt;SAMP&gt;=3&lt;/SAMP&gt;, the routine performs reordering for both input matrices &lt;VAR&gt;A&lt;/VAR&gt; and &lt;VAR&gt;B&lt;/VAR&gt;.&lt;BR /&gt;3. if you are really interested in this functionality, &lt;STRONG&gt;I would recommend you submit the issue against MKL to Premier support( &lt;A href="https://premier.intel.com/" target="_blank"&gt;https://premier.intel.com/&lt;/A&gt; ) as a Feature Reguest.&lt;BR /&gt;&lt;/STRONG&gt;-Gennady&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2009 10:33:15 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2009-04-06T10:33:15Z</dc:date>
    <item>
      <title>sorted compressed sparse row matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866462#M8035</link>
      <description>Hi, I've been struggling for days with the following: in my finite element routine a huge sparse matrix is constructed in triplet/coordinate form. I used to solve this system with the old umfpack linear solver. Now I want to switch to the Pardiso solver included with the MKL. However, Pardiso needs the input in the SORTED compressed sparse row (CSR) format. I have implemented the&lt;SPAN style="font-family: Monaco; font-size: 12px;"&gt;mkl_dcsrcoo converter, which seems to work fine. Unfortunately, this routine doesn't sort the column indices though. The fastest way to achieve this is apparently a linear bucket sort, which is equivalent to the transpose of the sparse matrix. I can't find anything like this in the MKL though. There are simple and fast routines available in CSparse for matlab/c, but I am unable to translate those to fortran.&lt;/SPAN&gt;
&lt;DIV&gt;&lt;SPAN style="font-family: Monaco; font-size: 12px;"&gt;Any help on how to program this, or pointers to existing routines in MKL that I could use would be GREATLY appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Apr 2009 23:48:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866462#M8035</guid>
      <dc:creator>moortgatgmail_com</dc:creator>
      <dc:date>2009-04-03T23:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: sorted compressed sparse row matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866463#M8036</link>
      <description>&lt;BR /&gt;
&lt;P&gt;Hi,&lt;BR /&gt;1.MKL contains such routine internally but this routine is not declared externally.&lt;BR /&gt;2. As a temporarily workaround for sorting the column indexes you can usemkl_dcsradd(...) or mkl_dcsrmultcsr(...) routines ( see the description of these functions into &lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="mk:@MSITStore:C:AppsIntelMKL10.1docmklman.chm::/bla/bla_SBLAS2-3_routines.html"&gt;Sparse BLAS Level 2 and Level 3 Routines.&lt;/A&gt;)&lt;/SPAN&gt;&lt;BR /&gt;Please pay attention on parameter "sort" which specifies the type of reordering.&lt;BR /&gt;namely:&lt;BR /&gt;sort: If this parameter is not set (default), the routine does not perform reordering. If sort&lt;SAMP&gt;=1&lt;/SAMP&gt;, the routine arranges the column indices ja for each row in the increasing order and reorders the corresponding values of the matrix &lt;VAR&gt;A&lt;/VAR&gt; in the array a. If sort&lt;SAMP&gt;=2&lt;/SAMP&gt;, the routine arranges the column indices jb for each row in the increasing order and reorders the corresponding values of the matrix &lt;VAR&gt;B&lt;/VAR&gt; in the array b.If sort&lt;SAMP&gt;=3&lt;/SAMP&gt;, the routine performs reordering for both input matrices &lt;VAR&gt;A&lt;/VAR&gt; and &lt;VAR&gt;B&lt;/VAR&gt;.&lt;BR /&gt;3. if you are really interested in this functionality, &lt;STRONG&gt;I would recommend you submit the issue against MKL to Premier support( &lt;A href="https://premier.intel.com/" target="_blank"&gt;https://premier.intel.com/&lt;/A&gt; ) as a Feature Reguest.&lt;BR /&gt;&lt;/STRONG&gt;-Gennady&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2009 10:33:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866463#M8036</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-04-06T10:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: sorted compressed sparse row matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866464#M8037</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;Thanks so much. I wish I had checked back sooner (I thought I'd probably get an email notification; probably something I should have set up). Certainly, it would be useful if the sort-option was an option of mkl_dcsr_coo as well. In the meantime, I had written a fortran routine to do a fast bucket sort on the output sparse matrix, based on the transpose algorithm as implemented in CSparse. I will just paste it below in case it might be useful to others browsing the forum with related issues.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;--Joachim&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;axout = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;axtmp = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;aiout = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;; ajout = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;; ajperm=&lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ajtmp =&lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;; aitmp=&lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;job(&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) = &lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! This setting indicates that we want to convert a coordinate/triplet based sparse&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! matrix to a compressed CSR based format (however, unfortunately with unsorted column indices).&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;job(&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) = &lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Both input and output matrices are 1-based (not 0-bases as in c).&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;job(&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Somehow the routine only seems to work when proceeding in 2 steps; this step only finds the compressed AI&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Next we will use the supplied conversion routine provided in the Intel Math Kernel Libaray (MKL) with syntax:&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! call mkl_dcsrcoo(job, n, acsr, ja, ia, nnz, acoo, rowind, colind, info)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;call&lt;/SPAN&gt; mkl_dcsrcoo (job, n, AXout, ajout,aiout,nnz, AX, Ai,Aj,info)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;job(&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Now, find AX and AJ in CRS form [this shouldn't change the arrays actually and can probably be omitted; as this routine&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! is only called once at time = 0, we'll leave it in for now.]&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;call&lt;/SPAN&gt; mkl_dcsrcoo (job, n, AXout, ajout,aiout,nnz, AX, Ai,Aj,info)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! The remainer of this routine is to sort the column indeces by transposing the sparse matrix (and back).&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Traverse the array with column numbers once to find&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! the nr of non-zero entries in each column (rather than rows).&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;aitmp = &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; i = &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;, nnz&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww(ajout(i)) = ww(ajout(i)) + &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;enddo&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Now it's trivial to find the compressed AI list for the A_transpose from the cumulative sumes of ww:&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;do&lt;/SPAN&gt; i = &lt;SPAN style="color: #1c00cf;"&gt;2&lt;/SPAN&gt;, n+&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;aitmp(i) = aitmp(i-&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;) + ww(i-&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;enddo&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Set the work-space ww equal to AI. In tranposing A, each entry of ww will be incremented&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! each time it's encountered.&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww = aitmp&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Transpose once&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;PI = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; i = &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;, n&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #007400;"&gt;! Traverse each row i&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; l = aitmp(i), aitmp(i+&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! l runs through all the columns in row i&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;pi = ww(ajout(l))&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! next we will place the row index i in column j at position pi = w[..]&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww(ajout(l)) = ww(ajout(l)) + &lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! which is post-incremented to prepare for the next entry to be inserted into column w[..]&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #c41a16;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(PI &amp;gt; NE) &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;PRINT&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;*, &lt;/SPAN&gt;"Error in pardiso solver. PI&amp;gt; NE:"&lt;SPAN style="color: #000000;"&gt;, PI, NE&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ajtmp(pi) = i&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;axtmp(pi) = Ax(l)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;ENDDO&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Enddo&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Transpose back [should be re-written as subroutine for ellegance ]&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;PI = &lt;SPAN style="color: #1c00cf;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww = aiout&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; i = &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;, n&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; l = aiout(i), aiout(i+&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;)-&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;pi = ww(ajtmp(l))&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ww(ajtmp(l)) = ww(ajtmp(l)) + &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;ajout(pi) = i&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;axout(pi) = Axtmp(l)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;ENDDO&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Enddo&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! The structure of the sparse matrix A will not change during this simulation&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! [it only depends on the geometry/mesh used, which defines which edge-faces are at what positions in A]&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! Therefore, once we know the original order of row- and column indeces in AI, AJ, and AX, and the&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! CSR sorted arrays, we can obtain a permutation array that can take array elements from the list as&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! provided in the main finite-element matrix contruction loop, above, and permute/ put them at the required,&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;! sorted positions to speed up the Pardiso solver:&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #007400;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;!&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;Find permutation array:&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; i = &lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;, n&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; l = aiout(i), aiout(i+&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;)-&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;thiscol = ajout(l)&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;DO&lt;/SPAN&gt; k = aiout(i), aiout(i+&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;)-&lt;SPAN style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91;"&gt;IF&lt;/SPAN&gt;(thiscol == AJ(k)) ajperm(l) = k&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;ENDDO&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;ENDDO&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #aa0d91;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Enddo&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Apr 2009 19:09:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sorted-compressed-sparse-row-matrix/m-p/866464#M8037</guid>
      <dc:creator>moortgatgmail_com</dc:creator>
      <dc:date>2009-04-13T19:09:01Z</dc:date>
    </item>
  </channel>
</rss>

