- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting bad values when using cblas_dgemm in x64. However, it works fine in x86. Is there some configuration i'm missing to use that function in x64? My code and the outputs for x86 and x64 can be found in the link to the stack overflow page below.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With the current Intel X64 C compiler
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.143 Build 20161005
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
I get the correct result when I compile with icl /Qmkl and run. I also get the correct result if I compile using the MS C++ V18 compiler and link with mkl_rt.lib.
Which compiler did you use, and how did you build the EXE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how do you compile with icl / Qmkl? I originally did not have mkl_rt.lib included. I tried adding that but i'm still getting the wrong values. Also, I've only found MSVC++ compilers that go up to 14.
This is the command line for my compilation:
/OUT:"C:\Users\nirma\OneDrive\Documents\Visual Studio 2015\Projects\mkltest\x64\Debug\mkltest.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Users\nirma\OneDrive\Documents\Visual Studio 2015\Projects\mkltest\x64\Debug\mkltest.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "mkl_rt.lib" /MACHINE:X64 /INCREMENTAL /PGD:"C:\Users\nirma\OneDrive\Documents\Visual Studio 2015\Projects\mkltest\x64\Debug\mkltest.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\mkltest.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it on another computer in x64. The code worked fine. I'm guessing it's an issue with this machine. Also the other machine had an older version of mkl. I'll update that one to 11.3 and see if i get the same issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you showed is only part of the command line. Are you compiling in an Intel-C command window (as I did in #2), or an MS-C command window, or in Visual Studio? Which C compiler are you using?
Older versions of MKL did not provide mkl_rt.lib. With such a version, use the MKL Link Line Advisor at https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor or see the MKL documentation for instructions.
Note that /Qmkl (note no space between '/' and 'Q') is an Intel C compiler option. MS C does not recognize that option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm compiling in visual studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way for me to step into cblas_dgemm function while debugging?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nirmal A. wrote:
Is there a way for me to step into cblas_dgemm function while debugging?
Only in the disassembly window, and I am not sure that you would find it useful to do so. Furthermore, be aware that CBLAS routines may actually be wrappers around Fortran BLAS routines in which the actual work is done. Why do you want to go there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I fixed the problem! I had to go to
Properties » Configuration properties » C/C++ » Code Generation » Runtime Library
and change it from
-Multi-threaded Debug DLL (/MDd): linking with dynamic Intel MKL libraries
to
-Multi-threaded (/MT): linking with static Intel MKL libraries
The issue was that I was doing dynamic linking instead of static. I found this webpage very useful in helping me overcome the issue
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page