<?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:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1482401#M34550</link>
    <description>&lt;P class="sub_section_element_selectors"&gt;Hi&amp;nbsp;Praneeth,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Thank you for the follow up. I looked at the link you provided. However, I am not quite sure which part is applicable to my code. Could you please direct me to a particular part that I should look which is related to the cubic spline I implemented?&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Best regards,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Mohammad&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 19:41:06 GMT</pubDate>
    <dc:creator>MohammadShafieipour</dc:creator>
    <dc:date>2023-05-02T19:41:06Z</dc:date>
    <item>
      <title>Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1475413#M34445</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to implement cubic spline interpolation&amp;nbsp;using Intel MKL in FORTRAN. To make it clear, I coded up an equivalent Python code as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;###start of python code for cubic spline interpolation###&lt;/P&gt;
&lt;P&gt;from numpy import *&lt;BR /&gt;from scipy.interpolate import CubicSpline&lt;BR /&gt;from matplotlib.pyplot import *&lt;/P&gt;
&lt;P&gt;#Sample data, y_data=sin(x_data)&lt;BR /&gt;x_data = [0,1,2,3,4,5,6]&lt;BR /&gt;y_data = [ 0,0.84147098,0.90929743,0.14112001,-0.7568025,-0.95892427,-0.2794155]&lt;/P&gt;
&lt;P&gt;#Defining interploation points&lt;BR /&gt;x = arange(0, 2*pi, 0.2)&lt;/P&gt;
&lt;P&gt;#Building the cubic spline using CubicSpline class in scipy.interpolate&lt;BR /&gt;cs = CubicSpline(x_data, y_data, axis=0, bc_type='not-a-knot', extrapolate=False)&lt;BR /&gt;y_cubicSpline = cs(x)&lt;/P&gt;
&lt;P&gt;#Computing the exact values at interpolation points for comparison purposes&lt;BR /&gt;y_exact = sin(x)&lt;/P&gt;
&lt;P&gt;#Printing the results&lt;BR /&gt;print('x y_exact y_cubicSpline')&lt;BR /&gt;print('-----------------------------------------')&lt;BR /&gt;for i in range(len(x)):&lt;BR /&gt;print ("{:.1f} {:.15f} {:.15f}".format(x[i],y_exact[i],y_cubicSpline[i]))&lt;/P&gt;
&lt;P&gt;#Plotting the results&lt;BR /&gt;plot(x_data, y_data, 'ko', label='Sample Data')&lt;BR /&gt;plot(x, y_cubicSpline,'b-', label="Cubic Spline Interpolation")&lt;BR /&gt;plot(x, y_exact,'r--', label='Exact Sine Function')&lt;BR /&gt;xlabel('x')&lt;BR /&gt;ylabel('Sin(x)')&lt;BR /&gt;legend(loc='best')&lt;BR /&gt;grid()&lt;BR /&gt;show()&lt;/P&gt;
&lt;P&gt;###end of python code for cubic spline interpolation###&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results are as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohammadShafieipour_0-1681229677415.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/40123i88E5AE671B63C2A7/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="MohammadShafieipour_0-1681229677415.png" alt="MohammadShafieipour_0-1681229677415.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohammadShafieipour_1-1681229772179.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/40124i99C1BC3DE3481814/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="MohammadShafieipour_1-1681229772179.png" alt="MohammadShafieipour_1-1681229772179.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The relevant files are attached as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;cubic_spline_interpolation.txt&lt;/LI&gt;
&lt;LI&gt;results.txt&lt;/LI&gt;
&lt;LI&gt;Figure_1.pdf&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I understand, there are some examples regarding the implementation of cubic splines using MKL in FORTRAN in the following directory:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.5.274\windows\mkl\examples\examples_core_f.zip\datafittingf"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;However, I was not able to find the functionality demonstrated above in Python.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Could you please help me re-produce the results of the Python code using Intel MKL functionalities in FORTRAN?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 16:30:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1475413#M34445</guid>
      <dc:creator>MohammadShafieipour</dc:creator>
      <dc:date>2023-04-11T16:30:48Z</dc:date>
    </item>
    <item>
      <title>Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1476686#M34466</link>
      <description>&lt;P&gt;Hi Mohammad,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;A FORTRAN example regarding cubic spline interpolation(dfdcubicspline_interp) is available in oneMKL 2023.1 under the below path.&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Intel\oneAPI\mkl\2023.1.0\examples\examples_core_f.zip\f\datafitting\source&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please check if this matches your functionality?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Praneeth Achanta&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Apr 2023 09:43:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1476686#M34466</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-04-14T09:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1477525#M34472</link>
      <description>&lt;P&gt;Thank you for your reply. Currently, I do not have MKL 2023. I used the following example (from Version 2018)&lt;/P&gt;
&lt;P&gt;"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.5.274\windows\mkl\examples\examples_core_f.zip\datafittingf\source\dfdcubicspline_interp.f"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is what I coded up (CubicSplineMKL.f90) using the above example. Since I am not intending to use parallel processing features yet, I removed the blocks from the code (NNBLOCKS). Also, I am only interested in the interpolated points (not the derivative values). The results look good as attached (result.txt).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please let me know if this is implemented correctly? Is there a feature in MKL 2023 that can increase the performance of such computations?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 15:46:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1477525#M34472</guid>
      <dc:creator>MohammadShafieipour</dc:creator>
      <dc:date>2023-04-17T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1478676#M34491</link>
      <description>&lt;P&gt;Hi Mohammad,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know the results are satisfactory. For more tips on code optimization and program performance improvement please refer to the below link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-0/optimization-and-programming.html" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-0/optimization-and-programming.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Praneeth Achanta&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Apr 2023 11:30:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1478676#M34491</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-04-20T11:30:18Z</dc:date>
    </item>
    <item>
      <title>Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1480724#M34525</link>
      <description>&lt;P&gt;Hi Mohammad,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please provide an update on your issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Praneeth Achanta&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Apr 2023 04:02:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1480724#M34525</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-04-27T04:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1480885#M34534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Praneeth,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the follow up. I looked at the link you provided. However, I am not quite sure which part is applicable to my code. Could you please direct me to a particular part that I should look which is related to the cubic spline I implemented?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Mohammad&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 13:51:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1480885#M34534</guid>
      <dc:creator>MohammadShafieipour</dc:creator>
      <dc:date>2023-04-27T13:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1482401#M34550</link>
      <description>&lt;P class="sub_section_element_selectors"&gt;Hi&amp;nbsp;Praneeth,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Thank you for the follow up. I looked at the link you provided. However, I am not quite sure which part is applicable to my code. Could you please direct me to a particular part that I should look which is related to the cubic spline I implemented?&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Best regards,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Mohammad&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 19:41:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1482401#M34550</guid>
      <dc:creator>MohammadShafieipour</dc:creator>
      <dc:date>2023-05-02T19:41:06Z</dc:date>
    </item>
    <item>
      <title>Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483016#M34554</link>
      <description>&lt;P&gt;Hi Mohammad,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please use the latest version of Intel oneMKL for the best performance so that we could analyze and assist you accordingly. Further performance improvements can be made by using features such as Parallelization, etc. &lt;/P&gt;&lt;P&gt;If you need additional help, please provide more details regarding your use case, system hardware, etc. as performance varies by your usage, configuration, and other factors.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praneeth Achanta&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 May 2023 10:56:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483016#M34554</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-05-04T10:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483049#M34555</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;Praneeth,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your support.&lt;/SPAN&gt;&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;
&lt;P&gt;&lt;SPAN&gt;Mohammad&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 13:45:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483049#M34555</guid>
      <dc:creator>MohammadShafieipour</dc:creator>
      <dc:date>2023-05-04T13:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using FORTRAN Intel MKL to build CubicSpline() available in scipy.interpolate</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483316#M34557</link>
      <description>&lt;P&gt;Hi Mohammad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for accepting as solution. Glad to know your issue was resolved. If you need any additional information please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Praneeth Achanta&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 04:39:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-FORTRAN-Intel-MKL-to-build-CubicSpline-available-in-scipy/m-p/1483316#M34557</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-05-05T04:39:24Z</dc:date>
    </item>
  </channel>
</rss>

