<?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: Re:Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs()) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284123#M31362</link>
    <description>Hi, thanks. I am working on the DevCloud. Can I get an external link, like a git repository,  to download this example? Thank you.</description>
    <pubDate>Mon, 24 May 2021 15:39:38 GMT</pubDate>
    <dc:creator>Oluwatosin</dc:creator>
    <dc:date>2021-05-24T15:39:38Z</dc:date>
    <item>
      <title>Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1283555#M31355</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have been trying to use the getrs() routine, but I can't seem to get pass, size = 50 when executing the code, I need to be able to measure for size close to 100,000,000. I have to call first the getrf() routine according to the documentation, and I think this is where I miss it. I would appreciate any suggestions to improve the getrf() section of program; thank you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am also following the matrix_multiplication with gemm code sample to generate my code;&lt;BR /&gt;&lt;BR /&gt;The basic idea of what I am working on is:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;1. Create a matrix, A, of size n * n;&lt;BR /&gt;2. Initialize the matrix A, to zero;&lt;BR /&gt;3. Populate the sub, super and main diagonals with -1.0, -1,0 and 2.0&amp;nbsp; or random numbers;&lt;BR /&gt;4. Create a vector, for the right hand side and initialize it randomly.&lt;BR /&gt;4. Call the getrf() routine to factorize the system (device code);&lt;BR /&gt;5. Call the getrs() routine to solve the system (device code);&lt;BR /&gt;6. Compare the results of getrs() with results of host tridiagonal solver algorithm.&lt;BR /&gt;&lt;BR /&gt;Here's what I have for the first four steps (getrf() )&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;size_t size = atoi(argv[1]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sycl::queue device_queue{sycl::default_selector{}};&lt;/P&gt;
&lt;P&gt;sycl::context context&amp;nbsp; = device_queue.get_context();&lt;/P&gt;
&lt;P&gt;sycl::device device = device_queue.get_device();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int_64 i , j;&lt;/P&gt;
&lt;P&gt;int64_t m = size, n = size, nrhs = size, lda = size;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Allocate memory&lt;BR /&gt;double **A = sycl::malloc_shared&amp;lt;double*&amp;gt;(m * n, device_queue);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;for(i = 0; i &amp;lt; lda; i++){&lt;/P&gt;
&lt;P&gt;A[i] = sycl::malloc_shared&amp;lt;double&amp;gt;(lda, device_queue);}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Initialize array to zero;&lt;BR /&gt;for(i = 0; i &amp;lt; m; i++){&lt;/P&gt;
&lt;P&gt;for(j = 0; j &amp;lt; n; j++){&lt;BR /&gt;A[i][j] = 0.0;}}&lt;/P&gt;
&lt;P&gt;// Populate sub,super, main diagonals of A&lt;/P&gt;
&lt;P&gt;for(i = 0; i &amp;lt; lda; i++){&lt;/P&gt;
&lt;P&gt;A[i][i] = 2.0; // Main diagonal&lt;/P&gt;
&lt;P&gt;if(i &amp;lt; lda){&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A[i][i+1] = -1.0;} // Super diagonal&lt;/P&gt;
&lt;P&gt;if(i &amp;gt; 0){&lt;/P&gt;
&lt;P&gt;A[i][i-1] = -1.0;} // Sub diagonal&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;// Other arrays&lt;/P&gt;
&lt;P&gt;int64_t *ipiv = sycl::malloc_shared&amp;lt;std::int64_t&amp;gt;(ldb, device_queue);&lt;/P&gt;
&lt;P&gt;auto b = sycl::malloc_shared&amp;lt;double&amp;gt;(ldb, device_queue);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Initialize result array, b&lt;/P&gt;
&lt;P&gt;for(i = 0; i &amp;lt; ldb; i++){&lt;/P&gt;
&lt;P&gt;b[i] = 1.0;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int64_t info = 0;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;int64_t scratchpad_size_getrf = oneapi::mkl::lapack::getrf_scratchpad_size&amp;lt;double&amp;gt;(device_queue, m, n, lda);&lt;/P&gt;
&lt;P&gt;double* scratchpad_getrf = sycl::malloc_shared&amp;lt;double&amp;gt;(scratchpad_size_getrf, device, context);&lt;/P&gt;
&lt;P&gt;auto event1 = oneapi::mkl::lapack::getrf(device_queue, m, n, *A, lda, ipiv, scratchpad_getrf, scratchpad_getrf, scratchpad_size_getrf);&lt;/P&gt;
&lt;P&gt;event1.wait_and_throw();&lt;/P&gt;
&lt;P&gt;cl::sycl::fre(scartchpad_getrf, context);&lt;/P&gt;
&lt;P&gt;} catch(oneapi::mkl::lapack::exception const&amp;amp; e1){&lt;/P&gt;
&lt;P&gt;std::cout &amp;lt;&amp;lt; ............&lt;/P&gt;
&lt;P&gt;if(e1.info() &amp;gt; 0){&lt;/P&gt;
&lt;P&gt;info = e1.info();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;return info;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I would appreciate any suggestions to improve this section of the program.Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 13:19:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1283555#M31355</guid>
      <dc:creator>Oluwatosin</dc:creator>
      <dc:date>2021-05-21T13:19:01Z</dc:date>
    </item>
    <item>
      <title>Re:Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284075#M31358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;I&gt;I would appreciate any suggestions to improve the getrf() section of program&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Please refer to the sample(getri.cpp) present in  $MKL_ROOT/examples/dpcpp/lapack/source folder.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2021 12:33:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284075#M31358</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-24T12:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284123#M31362</link>
      <description>Hi, thanks. I am working on the DevCloud. Can I get an external link, like a git repository,  to download this example? Thank you.</description>
      <pubDate>Mon, 24 May 2021 15:39:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284123#M31362</guid>
      <dc:creator>Oluwatosin</dc:creator>
      <dc:date>2021-05-24T15:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284455#M31378</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can view the MKL samples in the dir:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/opt/intel/oneapi/mkl/latest/examples&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can unzip the examples_dpcpp.tgz and check the getri.cpp example for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&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>Tue, 25 May 2021 11:20:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284455#M31378</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-25T11:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284470#M31380</link>
      <description>Alright! Thanks!</description>
      <pubDate>Tue, 25 May 2021 11:55:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1284470#M31380</guid>
      <dc:creator>Oluwatosin</dc:creator>
      <dc:date>2021-05-25T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285760#M31398</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please let us know if your issue has been resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 05:55:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285760#M31398</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-31T05:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285808#M31403</link>
      <description>Hello, &lt;BR /&gt;Yes, thank you!</description>
      <pubDate>Mon, 31 May 2021 08:30:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285808#M31403</guid>
      <dc:creator>Oluwatosin</dc:creator>
      <dc:date>2021-05-31T08:30:15Z</dc:date>
    </item>
    <item>
      <title>Re:Re: tridiagonal solver in oneMKL for dpc++ (linear solver routine getrs())</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285826#M31405</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Good day.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 May 2021 09:06:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Re-tridiagonal-solver-in-oneMKL-for-dpc-linear-solver-routine/m-p/1285826#M31405</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-31T09:06:28Z</dc:date>
    </item>
  </channel>
</rss>

