- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - soliton
Hi All,
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
This is a problem in the FORTRAN interface of the matrix movement routines which will be fixed in our future releases. In case you urgently need the fix I would recomend submitting this to the premier.intel.com site.
Best regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Petrov (Intel)
Quoting - soliton
Hi All,
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
Has anyone had any experience on using the in place traspose/scale routines mkl_?imatcopy?
I have been trying to make it work in my code but it always returns the matrix untouched.
I am using mkl 10.1 from a fortran program.
my simple test code is:
----------------------
a1(1,1) = 1.0_8
a1(1,2) = 3.0_8
a1(2,2) = 5.0_8
a1(2,1) = 7.0_8
call dimatcopy(C,T,2,2,5.0_8,a1,2,2)
write(*,*)a1(1,1)
write(*,*)a1(1,2)
write(*,*)a1(2,2)
write(*,*)a1(2,1)
----------------------
which writes back the values without change.
Cheers,
Cristian
This is a problem in the FORTRAN interface of the matrix movement routines which will be fixed in our future releases. In case you urgently need the fix I would recomend submitting this to the premier.intel.com site.
Best regards,
Vladimir
Thanx Vladimir,
The problem seems to be there for all of the "blas like extensions" routines Ive tried. Do you know wether the C ones work fine? If thats the case I might write a small C wrapper to get the job done.
Cheers,
Cristian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cristian,
Yes, the C interface works correctly.
Best regards,
Vladimir
Yes, the C interface works correctly.
Best regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FYI: Below - the output of your code:
a[0] == 1.000000
a[1] == 3.000000
a[2] == 5.000000
a[3] == 7.000000
C interface of mkl_dimatcopy
OUTPUT DATA
a[0] == 5.000000
a[1] == 25.000000
a[2] == 15.000000
a[3] == 35.000000
Press any key to continue .
--Gennady
a[0] == 1.000000
a[1] == 3.000000
a[2] == 5.000000
a[3] == 7.000000
C interface of mkl_dimatcopy
OUTPUT DATA
a[0] == 5.000000
a[1] == 25.000000
a[2] == 15.000000
a[3] == 35.000000
Press any key to continue .
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Gennady Fedorov (Intel)
FYI: Below - the output of your code:
a[0] == 1.000000
a[1] == 3.000000
a[2] == 5.000000
a[3] == 7.000000
C interface of mkl_dimatcopy
OUTPUT DATA
a[0] == 5.000000
a[1] == 25.000000
a[2] == 15.000000
a[3] == 35.000000
Press any key to continue .
--Gennady
a[0] == 1.000000
a[1] == 3.000000
a[2] == 5.000000
a[3] == 7.000000
C interface of mkl_dimatcopy
OUTPUT DATA
a[0] == 5.000000
a[1] == 25.000000
a[2] == 15.000000
a[3] == 35.000000
Press any key to continue .
--Gennady
Ive managed to make a tiny C wrapper for the routines I needed and it works fine. Code for a rudimentary working interface to zomatadd is attached. Its probably not "correct" since my C is extremely rudimentary.
All the best,
Cristian
-----------------------------------------
#include
#include "mkl_trans.h"
void matadd_(int *d, MKL_Complex16 *a, MKL_Complex16 *alpha, MKL_Complex16 *b, MKL_Complex16 *beta, MKL_Complex16 *c)
{
unsigned long dim;
dim = *d;
mkl_zomatadd('C','N','N',dim,dim,*alpha,a,dim,*beta,b,dim,c,dim);
}
-----------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - soliton
Thanx Vladimir,
The problem seems to be there for all of the "blas like extensions" routines Ive tried. Do you know wether the C ones work fine? If thats the case I might write a small C wrapper to get the job done.
Cheers,
Cristian
the problem with this routine ( Fortran interfaces ) was fixed in MKL version 10.2. released yesterday.
This version available for download from intel registration center: https://registrationcenter.intel.com/
one comment:
use parameter fomat 5.0d1 instead of 5.0
mkl_dimatcopy( 'C','T', 2, 2, 5.0d1, a, 2, 2)
see below the output i received with your test:
THE In-place transposition/copying of matrices
500.000000000000
3500.00000000000
2500.00000000000
1500.00000000000
THE Out-place transposition/copying of matrices
25000.0000000000
75000.0000000000
125000.000000000
175000.000000000
THE END
Press any key to continue . . .
Regards, Gennady

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