Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

C# Nonlinear Optimization Problem Solvers

$
0
0

Hi,

I'm using Intel MKL from C#. In General it works. I want to use the Nonlinear Optimization Problem Solvers and I've translated the example, see http://software.intel.com/en-us/node/471540. But the dtrnlsp_solve gives me sometimes a memory exception (attempt to read write protected memory).  I've attached all the dllimports, see below.

[DllImport("mkl", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)]

internal static extern int dtrnlsp_init(

ref IntPtr handle, ref int n, ref int m, IntPtr x, [In] double[] eps, ref int iter1, ref int iter2, ref double rs);

[DllImport("mkl", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)]

internal static extern int dtrnlsp_check(

ref IntPtr handle, ref int n, ref int m, IntPtr fjac, IntPtr fvec, [In] double[] eps, [In, Out] int[] info);

[DllImport("mkl", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)]

internal static extern int dtrnlsp_solve(

ref IntPtr handle, [In, Out] IntPtr fvec, [In] IntPtr fjac, ref int RCI_Request);

[DllImport("mkl", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)]

internal static extern int dtrnlsp_get(

ref IntPtr handle, ref int iter, ref int st_cr, ref double r1, ref double r2);

[DllImport("mkl", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)]

internal static extern int dtrnlsp_delete(

ref IntPtr handle);

Regards Michael

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>