- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Encountering errors with matrix multiplication using MKL.NET.Matrix Nuget package in a docker container
Dockerfile =======================
test.csproj file: =======================
test.cs file: =======================
output (when catching the exception): =======================
A total of 1 test files matched the specified pattern.
Failed matrix_multiply_test [106 ms]
Error Message:
Assert.Fail failed.
Stack Trace:
at matrix_test.matrix_multiply_test() in C:\test\test.cs:line 20
Standard Output Messages:
-2147467259 (translates to 0x80004005, an Unspecified Error)
MKL.NET
output (not catching the exception) =======================
System.Runtime.InteropServices.SEHException: External component has thrown an exception.
Stack Trace:
at MKLNET.Blas.Unsafe.gemm(Layout Layout, Trans TransA, Trans TransB, Int32 M, Int32 N, Int32 K, Double alpha, Double* A, Int32 lda, Double* B, Int32 ldb, Double beta, Double* C, Int32 ldc)
at MKLNET.Expression.MatrixMultiply.Evaluate()
at MKLNET.Expression.MatrixExpression.op_Implicit(MatrixExpression a)
at matrix_test.matrix_multiply_test() in C:\test\test.cs:line 16
Some scenarios where this error doesn't exist (that could help isolate the issue):
1. when using mcr.microsoft.com/dotnet/sdk:6.0-jammy image, indicating that the external failure is due to something specific to the windows image. To run in a linux container, I change the runtime package to MKL.NET.linux-x64 and change dockerfile test path to /test/
2. executing the unit test outside of a docker image, indicating some expected component from windows is missing in the docker image
Insight on why this error could be happening or how to get more information out of the external failure would be greatly helpful. Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
After reproducing your case, I think that the is an issue related to dynamic libraries in the Docker environment. You can try to use tools like Understanding the Dependencies of a Visual C++ Application | Microsoft Learn to check this.
Best regards,
Aleksandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Did you get a chance to try the instructions I sent earlier?
Best regards,
Aleksandra
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page