- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have narrowed down an issue when compiling a simple HelloWorld code using debug flags (`-DCMAKE_BUILD_TYPE=Debug`) on MacOS (11.0.1 with XCode 11.7 and Parallel Studio Xe 19.1.2.258 20200623 or XCode 12.2 and OneApi 2021.1.1). I have uploaded my MWE of this issue, and I wish to confirm if it's not miss-configuration on my part.
#include <iostream>
#include <mkl.h>
int main() {
double M[10] = {};
double X[4] = {};
double Y[4] = {};
std::cout << "Trying BLAS operation:" << std::endl;
// for (int i = 0; i < 10; i++)
cblas_dspmv(CblasColMajor, CblasUpper, 4,
1.0f, M, X, 1, 0.0f, Y, 1);
std::cout << "Success" << std::endl;
return 0;
}
PS: I had a similar issue on Linux, but I cannot currently reproduce it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have found the porblem, and indeed it was a configuration error.
I was compiling and linking with `ilp64` while still using default `int` parameters. After switching to `lp64` everything works perfectly fine.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should add the Segmentation fault error I get is `EXC_BAD_ACCESS (code=EXC_I386_GPFLT)` in the BLAS function, and when the debug mode is turned off the programm runs normally with appropriate results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us!
As your issue is related to MKL and we have a dedicated forum for MKL related issues. So we are redirecting your thread to MKL Forum for faster response.
Have a Good day!
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have found the porblem, and indeed it was a configuration error.
I was compiling and linking with `ilp64` while still using default `int` parameters. After switching to `lp64` everything works perfectly fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the update. Good to know that it worked. Let me know if I can close this thread from my end?
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, go ahead and close it. Maybe someone in the same situation as me will find this post by accident when needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the confirmation. Intel will no longer monitor this thread. Further responses on this thread will be considered community only.
--Rahul
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/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