- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
Does anybody know how to use mkl_?imatcopy? I cannot get it working on my system. I use a lot of other MKL routines without a glitch but this one does not do anything :(
I work in MSVC 2008 with MKL 10.2
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andrew,
The root cause of the problem is using Cblas constants instead of the chars ('R' for row-major, and 'N' for no action) as documented in the MKL manual.
Please use
mkl_dimatcopy('R','N',3,3,K,&(D1(0,0)),3,3);
instead of
mkl_dimatcopy(CblasRowMajor,CblasNoTrans,3,3,K,&D1(0,0),3,3);
Best regards,
Vladimir
The root cause of the problem is using Cblas constants instead of the chars ('R' for row-major, and 'N' for no action) as documented in the MKL manual.
Please use
mkl_dimatcopy('R','N',3,3,K,&(D1(0,0)),3,3);
instead of
mkl_dimatcopy(CblasRowMajor,CblasNoTrans,3,3,K,&D1(0,0),3,3);
Best regards,
Vladimir
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi krfighter,
in's not clear what do you mean by "but this one does not do anything"?
is that mean the input array == the output one?
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please provide a testcase?
It's not cleare what are you trying to do.
Thanks,
Vladimir
Could you please provide a testcase?
It's not cleare what are you trying to do.
Thanks,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am terribly sorry that first post was not clear enough.
P.S. Is it just me or all MKL developers are Russian? :) !
Yes, input equals to output for some reason.
Here is an example code:
using namespace boost::numeric::ublas;
double K(3.0);
matrix D1;
D1.resize(3,3);
for (int i=0;i<3;++i) for (int j=0;j<3;++j) D1(i,j)=1.0;
mkl_dimatcopy(CblasRowMajor,CblasNoTrans,3,3,K,&D1(0,0),3,3);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My first guess is that you are passing CblasNoTrans to mkl_dimatcopy.
My second thought is that you may be simply scaling...
In this case I wonder what D1 and D2 are in your example?
Best regards,
Vladimir (yet another one)
My first guess is that you are passing CblasNoTrans to mkl_dimatcopy.
My second thought is that you may be simply scaling...
In this case I wonder what D1 and D2 are in your example?
Best regards,
Vladimir (yet another one)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I do not need transposition.
Yes, I thought I could use this procedure for simple scaling (scalar multiplication)Sorry, it should be D1 in both cases. Already corrected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andrew,
The root cause of the problem is using Cblas constants instead of the chars ('R' for row-major, and 'N' for no action) as documented in the MKL manual.
Please use
mkl_dimatcopy('R','N',3,3,K,&(D1(0,0)),3,3);
instead of
mkl_dimatcopy(CblasRowMajor,CblasNoTrans,3,3,K,&D1(0,0),3,3);
Best regards,
Vladimir
The root cause of the problem is using Cblas constants instead of the chars ('R' for row-major, and 'N' for no action) as documented in the MKL manual.
Please use
mkl_dimatcopy('R','N',3,3,K,&(D1(0,0)),3,3);
instead of
mkl_dimatcopy(CblasRowMajor,CblasNoTrans,3,3,K,&D1(0,0),3,3);
Best regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
Thanks a lot!
Such a silly mistake to mess it up with CBLAS interface constants...

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page