<?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: Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1500409#M34722</link>
    <description>&lt;P&gt;Hi Ahmad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the code sample, Could you please let us know if the example in the below path meets your requirement and get back to us if there is any difference in our understanding?&lt;/P&gt;
&lt;P&gt;C:\Program Files(x86)\Intel\oneAPI\mkl\latest\examples\examples_core_c.zip\c\pdepoisson\source\d_Helmholtz_3D_c.c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Are these functions thread-safe and can I solve the equation at different times in parallel?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;Intel MKL functions are generally thread-safe, and you can often control the level of parallelism through configuration options like setting the number of threads. &lt;/SPAN&gt;&lt;SPAN&gt;However, as the threading behavior can vary depending on the function, you could use the thread control functions like mkl_set_num_threads() or&amp;nbsp;mkl_get_max_threads()&amp;nbsp; or an internal threading layer&amp;nbsp;to manage parallelism.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2023 14:06:36 GMT</pubDate>
    <dc:creator>ShanmukhS_Intel</dc:creator>
    <dc:date>2023-07-26T14:06:36Z</dc:date>
    <item>
      <title>Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1499253#M34704</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to solve a time-dependent 3D Poisson equation using the Intel MKL d_Helmholtz_3D function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;\nabla^2\phi(x,y,z,t)=f(x,y,z,t)\;\;\;(x,y,z)\in[0, L_x]\times[0, L_y]\times[0, L_z]. See the attached picture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The domain is a fixed domain, boundary conditions are the same, and the only term that changes is the right-hand side of the Poisson equation f(x,y,z), hence solving for different phi(x,y,z) at different times, t0, t1, ..., tn.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have successfully solved the Poisson equation for f(x,y,z) at a specific time step and I can loop through all the time steps and call all 4 functions below and solve for the solution at each timestep. However, I want to see if there is room for optimization and acceleration of this computation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(1) d_init_Helmholtz_3D(&amp;amp;ax, &amp;amp;bx, &amp;amp;ay, &amp;amp;by, &amp;amp;az, &amp;amp;bz, &amp;amp;nx, &amp;amp;ny, &amp;amp;nz, BCtype, &amp;amp;q, ipar, dpar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;(2) d_commit_Helmholtz_3D(f, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &amp;amp;xhandle, &amp;amp;yhandle, ipar, dpar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;(3) d_Helmholtz_3D(f, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &amp;amp;xhandle, &amp;amp;yhandle, ipar, dpar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;(4) free_Helmholtz_3D(&amp;amp;xhandle, &amp;amp;yhandle, ipar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, I wanted to know if it is possible t&lt;/SPAN&gt;&lt;SPAN&gt;o factor out the common tasks among solving the Poisson equation for all of f(x,y,z,t), calling the common tasks once, and then loop through f(x,y,z,t_i) i = 0, ...N for solving for phi?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, can I call d_init_Helmholtz_3D once and then loop through d_commit_Helmholtz_3D and&amp;nbsp;d_Helmholtz_3D as in below? Or, is there a better way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// One potential optimization:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// Setup the solver once, for all f(x,y,z,t_i)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;d_init_Helmholtz_3D(&amp;amp;ax, &amp;amp;bx, &amp;amp;ay, &amp;amp;by, &amp;amp;az, &amp;amp;bz, &amp;amp;nx, &amp;amp;ny, &amp;amp;nz, BCtype, &amp;amp;q, ipar, dpar, &amp;amp;stat);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// Loop through the RHS functions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for(int i = 0; i &amp;lt; N; i++){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; // f_i = f(x,y,z,t_i)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; d_commit_Helmholtz_3D(f_i, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &amp;amp;xhandle, &amp;amp;yhandle, ipar, dpar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; d_Helmholtz_3D(f_i, bd_ax, bd_bx, bd_ay, bd_by, bd_az, bd_bz, &amp;amp;xhandle, &amp;amp;yhandle, ipar, dpar, &amp;amp;stat);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; // save the solution to a different variable&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; // e.g., sol_i = f_i;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// Finally&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;free_Helmholtz_3D(&amp;amp;xhandle, &amp;amp;yhandle, ipar, &amp;amp;stat);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As an additional acceleration and optimization, are these functions thread-safe and can I solve the equation at different times in parallel?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, is there a code sample for a time-dependent Poisson equation solver?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any tips and help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:45:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1499253#M34704</guid>
      <dc:creator>AhmadOneAPI</dc:creator>
      <dc:date>2023-06-26T20:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1500409#M34722</link>
      <description>&lt;P&gt;Hi Ahmad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the code sample, Could you please let us know if the example in the below path meets your requirement and get back to us if there is any difference in our understanding?&lt;/P&gt;
&lt;P&gt;C:\Program Files(x86)\Intel\oneAPI\mkl\latest\examples\examples_core_c.zip\c\pdepoisson\source\d_Helmholtz_3D_c.c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Are these functions thread-safe and can I solve the equation at different times in parallel?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;Intel MKL functions are generally thread-safe, and you can often control the level of parallelism through configuration options like setting the number of threads. &lt;/SPAN&gt;&lt;SPAN&gt;However, as the threading behavior can vary depending on the function, you could use the thread control functions like mkl_set_num_threads() or&amp;nbsp;mkl_get_max_threads()&amp;nbsp; or an internal threading layer&amp;nbsp;to manage parallelism.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 14:06:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1500409#M34722</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-26T14:06:36Z</dc:date>
    </item>
    <item>
      <title>Re:Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1502382#M34776</link>
      <description>&lt;P&gt;Hi Ahmad,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A gentle reminder:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Could you please let us know if the example provided in the earlier reply helped? &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Jul 2023 17:08:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1502382#M34776</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-06T17:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1502399#M34779</link>
      <description>Hi Shanmukh.SS,&lt;BR /&gt;&lt;BR /&gt;I did find an example but it is not helpful. I was looking for an example for time dependent Poisson solver.&lt;BR /&gt;&lt;BR /&gt;My question in my post is mainly for a case where there are multiple right hand functions for the same domain and same boundary conditions for all those right hand side function.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Jul 2023 17:45:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1502399#M34779</guid>
      <dc:creator>AhmadOneAPI</dc:creator>
      <dc:date>2023-07-06T17:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1504391#M34813</link>
      <description>&lt;P&gt;Hi Ahmad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the use case provide, You could try running d_init_Helmholtz_3D for initialization once and free_Helmholtz_3D once to free the resource while looping through the d_commit_Helmholtz_3D and&amp;nbsp;d_Helmholtz_3D for different values as you mentioned by saving the result in a different variable. Please get back to us if you face any errors after implementing this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the below URL which helps you with more information regarding the sequence of Invoking Poisson Solver Routines&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-fortran/2023-1/sequence-of-invoking-poisson-solver-routines.html" target="_blank" rel="noopener noreferrer"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-fortran/2023-1/sequence-of-invoking-poisson-solver-routines.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on this, if you still face any challenges, we would like to assist you further on that by checking with the appropriate team internally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 13:57:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1504391#M34813</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-26T13:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Solving a Time-Dependent 3D Poisson Equation Solver Using Intel MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1506550#M34847</link>
      <description>&lt;P&gt;Hi Ahmad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A gentle reminder:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Could you please let us know if there are any updates on your issue? It helps us in guiding you further regarding your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 13:32:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Solving-a-Time-Dependent-3D-Poisson-Equation-Solver-Using-Intel/m-p/1506550#M34847</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-26T13:32:02Z</dc:date>
    </item>
  </channel>
</rss>

