- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cblas_daxpy fails (crashes to desktop) when called from C++/CLI code that targets .NET Core (or related targets, such as .NET 8). It works properly when called from native C++ code, or C++/CLI code that targets .NET Framework.
The following C++/CLI code can be used to reproduce the problem:
cli::array<double>^ x = gcnew cli::array<double>(3);
x[0] = -1.0; x[1] = 2.0; x[2] = -1.5;
cli::array<double>^ y = gcnew cli::array<double>(3);
y[0] = 2.5; y[1] = -3.0; y[2] = 4.0;
pin_ptr<double> px = &x[0];
pin_ptr<double> py = &y[0];
cblas_daxpy(3, 2.0, px, 1, py, 1);
Console::WriteLine("{0}\t{1}\t{2}", y[0], y[1], y[2]);
Console applications exit with code -1073740791 (0xc0000409), and desktop applications crash without raising an exception.
The attached Zip file contains the following projects:
- TestDAXPYNativeCPP - native C++ console application (works)
- TestDAXPYNetFxCPP - C++/CLI console application targeting .NET Framework 4.8 (works)
- TestDAXPYNetCoreCPPDLL and TestDAXPYNetCoreCS - C++/CLI class library (DLL) and C# console application targeting .NET 5 (C++/CLI does not support .NET Core console applications, so the C# app calls the C++/CLI DLL) (crashes)
Note that the code has been tested with multiple versions of Microsoft C++ compiler, and was working properly with Math Kernel Library versions 2025.1 and earlier.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same issue. I also have the similar error with cblas_dsymv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this issue!
It has been fixed and the fix will be included in the oneMKL 2025.3 release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page