- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I implemented a C# program that test LAPACKE_zgesvxx function.
The example works with x64 platform but fail with x86 platform, return info=-7 error!
I suppose there are difference in function declaration, but I don't know where, and how to solve it.
I did many changes in the declaration part, but with 25 parameters became quite difficult to find the solution.
any ideas?
I Attach the example code and the data files used to test.
Thank you
Gianluca
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably x86 does not correctly interprets 'long' type, which is 8-byte in C#. Did you try replacing 'long' with 'int'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
[DllImport("mkl_rt.dll", ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] internal static extern int LAPACKE_zgesvxx( int matrix_layout, char fact, char trans, int n, int nrhs, [In, Out] Complex* A, int lda, [In, Out] Complex* af, int ldaf, [In, Out] int[] ipiv, ref char equed, [In, Out] double[] r, [In, Out] double[] c, [In, Out] Complex* B, int ldb, [In, Out] Complex* x, int ldx, ref double rcond, ref double rpvgrw, [In, Out] double[] berr,//ref double berr, int n_err_bnds, [In, Out] double[] err_bnds_norm, [In, Out] double[] err_bnds_comp, int nparams, [In, Out] double[] parameters );
I replaced long with int and now it works on both platforms
Thank you
BR
Gianluca
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page