Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Calling mkl_dimatcopy from C#

Zhang__Site
Beginner
1,092 Views

Hi,

I am following the examples on using MKL from C# (https://www.intel.com/content/www/us/en/develop/articles/using-intel-mkl-in-your-c-program.html). I downloaded the example files there and tried to add some more that I might need for my own applications. I tried the following

- cblas_dscal. This works very well in the test.
- mkl_dimatcopy. This is causing a problem when running and I could not solve it myself. Visual studio is telling "System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'" At this moment I have no idea how it can be fixed and any help on it would be appreciated. Thanks!

The project file is attached for reference.

Regards, Site

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
1,092 Views

formally speaking, mkl doesn't support these API, but the first of our recommendation is to be sure that your C code works well. did you make sure that you called this routine correct from C API?

0 Kudos
Zhang__Site
Beginner
1,092 Views

Hi Gennady, 

Thanks for your answer. I will follow your suggestion and test the C API first.

Regards, Site

0 Kudos
Reply