-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ldd-link error when building with dub against MKL-Intel #6
Comments
Nope, it looks like a bug. Probably mir-blas dub.sdl needs an update for intel-mkl for linux. |
This is Windows machine. I haven't tried it on Linux. |
Ah, interesting. Why do you have both dub.sdl and dub.json? |
Because it is not said you cannot have them both and |
dub will use either "dependencies": {
"mir-random": "~>2.2.11",
"mir-blas": "~>1.1.9"
} It should work on Windows without any other additional configs if MKL is installed because MKL is the default in Windows configs and we use mir-blas on windows in production every day. |
Sorry, reopening because I mistakenly uncommented I removed dub.sdl and moved everything to dub.json. Tried removing the dub.json {
"name": "app",
"targetType": "executable",
"dependencies": {
"mir-algorithm": "~>3.7.18",
"mir-random": "~>2.2.11",
"mir-blas": "~>1.1.9"
},
"dflags-ldc": ["-mcpu=native"],
"subConfigurations": {"mir-blas": "mkl-sequential"},
"buildTypes": {
"release": {
"buildOptions": ["releaseMode", "inline", "optimize"],
"dflags": ["-boundscheck=off"]
},
"debug": {
"buildOptions": ["debugMode", "debugInfo", "optimize"]
},
"debug-profile": {
"buildOptions": ["debugMode", "debugInfo", "profile"]
},
"tests": {
"buildOptions": ["unittests"]
}
}
} Finally, here is the project repo with the latest commits: https://github.com/tastyminerals/mir_benchmarks |
The sparse gemm version from void main(){
import mir.sparse.blas: gemm
auto sp = sparse!int(3, 5);
sp[] = [[-5, 1, 7, 7, -4], [-1, -5, 6, 3, -3], [-5, -2, -3, 6, 0]];
auto a = sp.compress;
auto b = slice!double(5, 4);
b[] = [
[-5.0, -3, 3, 1], [4.0, 3, 6, 4], [-4.0, -2, -2, 2], [-1.0, 9, 4, 8],
[9.0, 8, 3, -2]
];
auto c = slice!double(3, 4);
gemm(1.0, a, b, 0, c); // works fine!
} |
try remove |
Tried removing
|
I have found the following section in MKL user docs: https://jp.xlsoft.com/documents/intel/mkl/11.0/mkl_userguide_win.pdf
But I think it is not directly related to mir blas though... |
Interesting. |
Sorry for the late reply. VS version: VisualStudio.16.Release/16.4.5+29806.167 I tried adding
What, worked is linking to
However, there is one last remaining exception:
|
Maybe the following can help You are doing debug build, so you should use debug versions of the libraries. Have you tried libcmtd.lib instead of libcmt.lib? In my case, the debug build worked fine, so I didn't worry about that. In release build I had to turn the buffer checking off (which seems to use the GSHandlerCheck functions). I can live without that in release version. /GS- C/C++ -> Code Generation -> Buffer Security Check = NO But in debug build it's usefull, so take this as "only for your information". Best luck. MAN |
So, linking the
Now, when I try to compile the project I get:
|
Asked LDC team ldc-developers/ldc#3402, |
See LDC's README.txt for how to use the MS toolchain, which is the simplest solution when linking other C[++] libs compiled without |
Thank you. I didn't have to modify
|
I would like to use
gemm
function from mir-blas in the dub project.Downloaded and installed Intel MKL library for Windows: https://software.intel.com/en-us/mkl/choose-download/windows
dub.json
dub.sdl
But running
$ dub build --compiler=ldc2
throws the following error:Am I doing everything correctly?
The text was updated successfully, but these errors were encountered: