<?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 Here is what I think is in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045935#M20970</link>
    <description>&lt;P&gt;Here is what I think is happening; if my guess is correct, what is involved is an implementation error that the MKL team needs to correct. I used the Windows Version&amp;nbsp;15.0.3.208 32-bit compiler, and the version of MKL included with it, namely,&amp;nbsp;11.2.3.&lt;/P&gt;

&lt;P&gt;The source files for the modules&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 12.1949996948242px; line-height: 13.4145002365112px;"&gt;MKL_DF_TYPE and&amp;nbsp;MKL_DF contain only interfaces and type definitions. The actual Fortran 95 code needed to redirect the call to the interface name to the actual F77 routines in the libraries is not to be found! Compounding the problem is the choice of the same name(s), e.g.,&amp;nbsp;&lt;/SPAN&gt;dfdinterpolate1d, for the F95 interface routine and the F77 routine in the library. The linker ends up directing your F95 call to the F77 routine, but the F77 routine expects 12 arguments and knows nothing about how to treat optional arguments. As a result, the last two arguments are pulled from the stack and the values of those are unpredictable because the caller did not put those arguments on the stack.&lt;/P&gt;

&lt;P&gt;Here are details of a test that I ran to check those conjectures. I ran the MKL example &lt;STRONG&gt;dfdcubicspline_interp.f&lt;/STRONG&gt; and the following program, which I know must fail:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;      program tst
      call dfdinterpolate1d()
      end
&lt;/PRE&gt;

&lt;P&gt;I compiled both examples with &lt;STRONG&gt;/Zi /Qmkl&lt;/STRONG&gt;, opened each in the VS debugger and set a breakpoint to the line where &lt;STRONG&gt;dfdinterpolate1d()&lt;/STRONG&gt; is called. After reaching that breakpoint, I pressed F11, which took me to the entry point&amp;nbsp;&lt;STRONG&gt;_DFDINTERPOLATE1D&lt;/STRONG&gt; in the MKL DLL. I then looked at the EIP value and the first few lines of the disassembly.&lt;/P&gt;

&lt;P&gt;I found that the same MKL entry point was reached in either case. There is a problem: where is the F95 wrapper/glue code?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 10:40:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2015-08-11T10:40:00Z</dc:date>
    <item>
      <title>MKL Interpolation gives strange results (fortran)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045932#M20967</link>
      <description>&lt;P&gt;With the help of the reference manual for MKL data fitting i have tried to put together a I have a piece of fortran code for interpolation using MKL. It seems to me to give somewhat strange results (I don't know what I am missing here).:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;  include 'mkl_df.f90'
  include 'mkl_dfti.f90'
  
  program TestMyFortranCode
  USE MKL_DF_TYPE
  USE MKL_DF
  use ISO_C_BINDING
  TYPE (DF_TASK) dftask
  integer(c_int),parameter  ::  NSITES = 1024
  integer(c_int)            ::  f_index(27)
  real(c_double)            ::  f(27)
  
  real(c_double) :: x(29)
  integer(c_int) :: nx
  integer(c_int) :: xhint
  real(c_double) :: y(29)
  integer(c_int) :: ny
  integer(c_int) :: yhint

  integer(c_int) :: sorder
  integer(c_int) :: stype
  real(c_double),target :: site(NSITES)
  integer(c_int) :: nsite
  integer(c_int) :: sitehint
  real(c_double) :: scoeff((size(x)-1)*DF_PP_CUBIC)
  integer(c_int) :: scoeffhint
  integer(c_int) :: bc_type

  integer(c_int) :: ndorder
&lt;/PRE&gt;

&lt;PRE class="brush:fortran;" style="font-size: 13.0080003738403px; line-height: 15.609601020813px;"&gt;  integer(c_int) :: nder&lt;/PRE&gt;

&lt;PRE class="brush:fortran;"&gt;  integer(c_int) :: derorder(3)

  integer(c_int) :: calc_type
  integer(c_int) :: method

  real(c_double),target :: r(size(site))
  integer(c_int) :: rhint
    
  real(c_double),POINTER :: site_ptr(:)
  real(c_double),POINTER :: r_ptr(:)

  integer(c_int) :: error
    
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  error = 0 
  site = (/(i*1.0d0, i=0,NSITES-1)/)/(NSITES) ! 
  f_index=(/ (ii,ii=14,40)/)
  f=10d0**(f_index/10.0d0)
  x = (/-1.d0, f, 22100.d0/)/22050.d0 
    
  nx    = size(x)
  xhint = DF_NO_HINT
  y = (/0.d0, 5.d0, 1.d0, -3.d0, -2.d0, -6.d0, -9.d0, -10.d0, -14.d0, -14.d0, &amp;amp;
        -15.d0, -15.d0, -16.d0, -20.d0, -24.d0, -19.d0, -10.d0, -13.d0, -15.d0, -16.d0, &amp;amp;
        -17.d0, -18.d0, -21.d0, -28.d0, -29.d0, -33.d0, -45.d0, -66.d0, -77.d0/)
  ny = 1
  yhint = DF_NO_HINT
  nsite      =  NSITES
  sitehint   = DF_NO_HINT

  sorder = DF_PP_CUBIC
  stype  = DF_PP_NATURAL

  scoeffhint = DF_UNIFORM_PARTITION

  bc_type = DF_BC_FREE_END
  rhint = DF_MATRIX_STORAGE_ROWS

  ndorder = 3
  derorder = (/1,0,1/)
  nder = 2

  error = dfdNewTask1D(dftask, nx, x, xhint, ny, y, yhint )
  error = dfdEditPPSpline1D( dftask, sorder, stype, bc_type,         &amp;amp;
    &amp;amp; scoeff=scoeff, scoeffhint=scoeffhint )
  calc_type = DF_PP_SPLINE 
  method = DF_METHOD_STD 
  error = dfdConstruct1D( dftask, calc_type, method )
  calc_type = DF_INTERP
  method = DF_METHOD_PP
  site_ptr =&amp;gt; site
  r_ptr    =&amp;gt; r
  error = dfdInterpolate1D( dftask, calc_type, method,                  &amp;amp;
    &amp;amp;      nsite, site_ptr, sitehint, ndorder, derorder, r=r_ptr,    &amp;amp;
    &amp;amp;      rhint=rhint )

  error = dfDeleteTask( dftask )
  write (*,*) r_ptr
  end program TestMyFortranCode
&lt;/PRE&gt;

&lt;P&gt;y are the function values of x and site are the interpolation sites (x-values) that I want interpolated values for put in r.&lt;/P&gt;

&lt;P&gt;The results for uneven indices looks somewhat as they should, closer to the y-values, but for even indices the results are more random (i.e. -68820.abc or 1013.xyz)&lt;/P&gt;

&lt;P&gt;After running the function "dfdNewTask1D" the second value of dftask seems always to be 0 (zero) and the first value seems to get a &lt;SPAN style="font-size: 13.0080003738403px; line-height: 15.609601020813px;"&gt;large&amp;nbsp;&lt;/SPAN&gt;random value (I.e. 7424768) (from what I can read out from debug-mode in msvs). Don't know if this is as it should be??&lt;/P&gt;

&lt;P&gt;Does anyone know what is going wrong, or if the results are normal, and then what are the results for even indices describing?&lt;/P&gt;

&lt;P&gt;(I use MSVS 2013)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 06:06:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045932#M20967</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-10T06:06:53Z</dc:date>
    </item>
    <item>
      <title>Which version of MKL are you</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045933#M20968</link>
      <description>&lt;P&gt;Which version of MKL are you using? The manual page at&amp;nbsp;https://software.intel.com/en-us/forums/topic/567633 shows the calling sequence as&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;status = dfdinterpolate1d(task, type, method, nsite, site, sitehint, ndorder, dorder, datahint, r, rhint, cell)&lt;/PRE&gt;

&lt;P&gt;There are no optional arguments and the number of arguments is 12, whereas your call has only 10. Do you have an overloaded Fortran 95 module procedure with the same name? I find this mysterious.&lt;/P&gt;

&lt;P&gt;There is a working example,&amp;nbsp;dfdcubicspline_interp.f, that is included with the MKL distribution in the examples/datafittingf/source sub-directory.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 18:45:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045933#M20968</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-08-10T18:45:13Z</dc:date>
    </item>
    <item>
      <title>Thanks for the reply mecej4.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045934#M20969</link>
      <description>&lt;P&gt;Thanks for the reply mecej4. I have the MKL 11.2.3 and I have used the&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;dfdcubicspline_interp.f formulation which only have 10 arguments. (=&amp;gt; I have no overloded module). The formulation in&amp;nbsp;&lt;/SPAN&gt;dfdfifthorderspline_interp.f and dfdlookup_interp.f&amp;nbsp;is also only using 10 arguments. None of the interpolation examples makes use of the datahint optional parameter.&lt;/P&gt;

&lt;P&gt;According to mkl_df.f90 both the datahint and cell (as well as sitehint, ndorder, dorder and rhint) are optional.&lt;/P&gt;

&lt;P&gt;Unfortunately, providing the parameters&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    real(c_double) :: datahint(4)
    
    integer(c_int) :: cell(0)

    datahint = (/1.,DF_NO_APRIORI_INFO,0.,0./)&lt;/PRE&gt;

&lt;P&gt;makes no significant change to the result (r). The result is very similar, with values for even indices differing quite a bit from the values in y, as without these parameters.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 04:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045934#M20969</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-11T04:55:00Z</dc:date>
    </item>
    <item>
      <title>Here is what I think is</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045935#M20970</link>
      <description>&lt;P&gt;Here is what I think is happening; if my guess is correct, what is involved is an implementation error that the MKL team needs to correct. I used the Windows Version&amp;nbsp;15.0.3.208 32-bit compiler, and the version of MKL included with it, namely,&amp;nbsp;11.2.3.&lt;/P&gt;

&lt;P&gt;The source files for the modules&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 12.1949996948242px; line-height: 13.4145002365112px;"&gt;MKL_DF_TYPE and&amp;nbsp;MKL_DF contain only interfaces and type definitions. The actual Fortran 95 code needed to redirect the call to the interface name to the actual F77 routines in the libraries is not to be found! Compounding the problem is the choice of the same name(s), e.g.,&amp;nbsp;&lt;/SPAN&gt;dfdinterpolate1d, for the F95 interface routine and the F77 routine in the library. The linker ends up directing your F95 call to the F77 routine, but the F77 routine expects 12 arguments and knows nothing about how to treat optional arguments. As a result, the last two arguments are pulled from the stack and the values of those are unpredictable because the caller did not put those arguments on the stack.&lt;/P&gt;

&lt;P&gt;Here are details of a test that I ran to check those conjectures. I ran the MKL example &lt;STRONG&gt;dfdcubicspline_interp.f&lt;/STRONG&gt; and the following program, which I know must fail:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;      program tst
      call dfdinterpolate1d()
      end
&lt;/PRE&gt;

&lt;P&gt;I compiled both examples with &lt;STRONG&gt;/Zi /Qmkl&lt;/STRONG&gt;, opened each in the VS debugger and set a breakpoint to the line where &lt;STRONG&gt;dfdinterpolate1d()&lt;/STRONG&gt; is called. After reaching that breakpoint, I pressed F11, which took me to the entry point&amp;nbsp;&lt;STRONG&gt;_DFDINTERPOLATE1D&lt;/STRONG&gt; in the MKL DLL. I then looked at the EIP value and the first few lines of the disassembly.&lt;/P&gt;

&lt;P&gt;I found that the same MKL entry point was reached in either case. There is a problem: where is the F95 wrapper/glue code?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 10:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045935#M20970</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-08-11T10:40:00Z</dc:date>
    </item>
    <item>
      <title>Once again, thanks a lot</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045936#M20971</link>
      <description>&lt;P&gt;Once again, thanks a lot mecej4.&lt;/P&gt;

&lt;P&gt;What can I do about it at this time? Report the findings somewhere?&lt;/P&gt;

&lt;P&gt;As I wrote previously, I tried the function again including the datahint and cell arguments in the routine call, with similar results as if I don't include them. Either I don't understand way the input arguments should be specified or else there is something wrong.. ?&lt;/P&gt;

&lt;P&gt;BTW I use&amp;nbsp;Intel(R) Visual Fortran Compiler XE 15.0.4.221 [IA-32]&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 10:58:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045936#M20971</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-11T10:58:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Erik T. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045937#M20972</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Erik T. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;What can I do about it at this time? Report the findings somewhere?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Usually one of the MKL/Intel people will respond in a day or two with a reply in this forum. If you have Premier Support, you can file a formal bug report.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I think that if in your code you make only the F77-style calls (including all arguments as listed in the documentation, even if their values may never be used in the MKL function/subroutine), things may work correctly. If you follow this route, you may need to remove the include lines that make interfaces available, but you need to keep the declarations of types and named constants available for the compiler to use while building your application.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 11:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045937#M20972</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-08-11T11:33:00Z</dc:date>
    </item>
    <item>
      <title>Hi Erik, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045938#M20973</link>
      <description>&lt;P&gt;Hi Erik,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Yes, we will investigate the issue. &amp;nbsp;I just quick run the code and &amp;nbsp;is the below result right or not?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; -5270.06285751546 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.3311452042090 &amp;nbsp; &amp;nbsp; &amp;nbsp; -4371.38789948286&lt;BR /&gt;
	&amp;nbsp; -15.4034790145797 &amp;nbsp; &amp;nbsp; &amp;nbsp; -3472.71294145026 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.4791246620909&lt;BR /&gt;
	&amp;nbsp; -2574.03798341765 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.5572251035164 &amp;nbsp; &amp;nbsp; &amp;nbsp; -1675.36302538505&lt;BR /&gt;
	&amp;nbsp; -15.6369232956298 &amp;nbsp; &amp;nbsp; &amp;nbsp; -776.688067352448 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.7173621952050&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;121.986890680154 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.7976847590155 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1020.66184871276&lt;BR /&gt;
	&amp;nbsp; -15.8770339438352 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1919.33680674536 &amp;nbsp; &amp;nbsp; &amp;nbsp; -15.9545527064378&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;2818.01176477796 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.0293944534202 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3301.02463352778&lt;BR /&gt;
	&amp;nbsp; -16.1011243940587 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3154.54491028549 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.1698459262363&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;3008.06518704319 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.2356987439030 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2861.58546380089&lt;BR /&gt;
	&amp;nbsp; -16.2988225410086 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2715.10574055859 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.3593570115032&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;2568.62601731630 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.4174418493365 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2422.14629407400&lt;BR /&gt;
	&amp;nbsp; -16.4732167484587 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2275.66657083170 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.5268214028195&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;2129.18684758941 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.5783955063690 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1982.70712434711&lt;BR /&gt;
	&amp;nbsp; -16.6280787530570 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1836.22740110481 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.6760108368335&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;1689.74767786252 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.7223314516484 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1543.26795462022&lt;BR /&gt;
	&amp;nbsp; -16.7671802914516 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1396.78823137792 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.8106970501931&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;1250.30850813562 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.8530214218229 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1103.82878489333&lt;BR /&gt;
	&amp;nbsp; -16.8942931002907 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;957.349061651030 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.9346517795467&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;810.869338408733 &amp;nbsp; &amp;nbsp; &amp;nbsp; -16.9742371535406 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;664.389615166436&lt;BR /&gt;
	&amp;nbsp; -17.0131886368992 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;533.094098647316 &amp;nbsp; &amp;nbsp; &amp;nbsp; -17.0516296843778&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;431.247674276086 &amp;nbsp; &amp;nbsp; &amp;nbsp; -17.0896594620255 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;329.401249904855&lt;BR /&gt;
	&amp;nbsp; -17.1273750981614 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;227.554825533625 &amp;nbsp; &amp;nbsp; &amp;nbsp; -17.1648737211045&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;125.708401162395 &amp;nbsp; &amp;nbsp; &amp;nbsp; -17.2022524591742 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;23.8619767911641&lt;BR /&gt;
	&amp;nbsp; -17.2396084406894 &amp;nbsp; &amp;nbsp; &amp;nbsp; -77.9844475800663 &amp;nbsp; &amp;nbsp; &amp;nbsp; -17.2770387939694&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 06:25:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045938#M20973</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-08-12T06:25:52Z</dc:date>
    </item>
    <item>
      <title>Ying H: Yes, the results</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045939#M20974</link>
      <description>&lt;P&gt;Ying H: Yes, the results looks correct, from about index 130 and forward. With diffenent NSITES I get somewhat different numbers but the values of the even indices are similar (too large and shifting between positive and negative sign).&lt;/P&gt;

&lt;P&gt;Thank you very much, I am looking forward to a solution!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 06:52:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045939#M20974</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-12T06:52:30Z</dc:date>
    </item>
    <item>
      <title>Hi Erik, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045940#M20975</link>
      <description>&lt;P&gt;Hi Erik,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;We can see the problem on seveval machine. It seems works fine on Linux SSE 4.2 machine. &amp;nbsp;we will investigate these &amp;nbsp;and update you if any solution.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Ying&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 02:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045940#M20975</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-08-13T02:13:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045941#M20976</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks. I am running on a lenovo T440 windows 7 machine.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Erik&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 06:34:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045941#M20976</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-13T06:34:21Z</dc:date>
    </item>
    <item>
      <title>Hi Erik, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045942#M20977</link>
      <description>&lt;P&gt;Hi Erik,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;we found the reason of the fail.&lt;/P&gt;

&lt;P&gt;according to the line derorder = (/1,0,1/), &amp;nbsp;results array should &amp;nbsp;contain function values as long as function second derivative values also. Hence you should allocate result space twice by 1024:&lt;/P&gt;

&lt;P&gt;Error line was:&amp;nbsp;&amp;nbsp; real(c_double),target :: r(size(site))&lt;/P&gt;

&lt;P&gt;Corrected line:&amp;nbsp; real(c_double),target :: r(size(site)&lt;STRONG&gt;*2&lt;/STRONG&gt;)&lt;/P&gt;

&lt;P&gt;if fix this, you will get expected result.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;PS:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Also we found why we have 10 arguments for dfdinterpolate1d() in user example instead of 12 in &lt;/SPAN&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;mkl_df.f90&lt;/STRONG&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; interface file.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Answer: Optional arguments can be omitted.&lt;/P&gt;

&lt;P&gt;You can see in mkl\__release_win\mkl\include\mkl_df.f90:&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTERFACE INTEGER FUNCTION dfdinterpolate1d(task, type, method, nsite,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site, sitehint, ndorder, dorder, datahint, r, rhint, cell)&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USE MKL_DF_TYPE&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE(DF_TASK)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: task&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,INTENT(IN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: type&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,INTENT(IN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: method&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;INTEGER,INTENT(IN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: nsite&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL(KIND=8),DIMENSION(*),INTENT(IN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: site&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,INTENT(IN),OPTIONAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: sitehint&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,INTENT(IN),OPTIONAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;:: ndorder&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER, DIMENSION(*),INTENT(IN),OPTIONAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: dorder&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL(KIND=8),DIMENSION(*),INTENT(IN),OPTIONAL :: datahint&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL(KIND=8),DIMENSION(*),INTENT(OUT)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: r&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,INTENT(IN),OPTIONAL&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:: rhint&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER,DIMENSION(*),INTENT(OUT),OPTIONAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: cell&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END FUNCTION&lt;/P&gt;

&lt;P style="margin-left:70.8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END INTERFACE&lt;/P&gt;

&lt;P&gt;that only first 5 + middle 1 arguments are necessary, and 6 ones are optional and can be omitted; and some arguments even &lt;STRONG&gt;can go in any order&lt;/STRONG&gt; if their name present in function call like in myfunc(arg1,arg1,arg3name=arg3value). That is why&lt;/P&gt;

&lt;P&gt;dfdInterpolate1D( dftask, calc_type, method, nsite, site_ptr, sitehint, ndorder, derorder, &lt;STRONG&gt;rhint=rhint&lt;/STRONG&gt;, r=r_ptr )&lt;/P&gt;

&lt;P&gt;is correct call, in spite of order of last 2 arguments.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 03:13:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045942#M20977</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-08-14T03:13:21Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045943#M20978</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thank you for that clarification. (The answer seems so simple now :) )&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 04:49:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Interpolation-gives-strange-results-fortran/m-p/1045943#M20978</guid>
      <dc:creator>Erik_T_1</dc:creator>
      <dc:date>2015-08-14T04:49:20Z</dc:date>
    </item>
  </channel>
</rss>

