Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Chang_Lei
Beginner
103 Views

Is CMKL9.0 provides correct staggered cosine transforms?

Jump to solution

I'm using CMKL 9.0 TT routines of staggered cosine transforms. But currently can not get results I want. The details are:
The matrix of finite difference of 1d three-point approximations Poisson equation with Neumann boundary conditions is:
1,-1,0...
-1,2,-1,...
.....
..... -1,2,-1
......,0,1,-1
Eigenvalues of this matrix is 2-2*cos((i-1)*pi/n), and the Eigenvectors are corresponding to staggered cosine transform. But I found in the example of TT routines d_trig_tforms_bvp.f90 and d_trig_tforms_slae.f90, the eigenvalues seems be given to (2.0D0*dsin(0.25D0*pi*(2*k-1)/n))**2. Am I wrong?

And manuals of different version provide different description to staggered cosine transforms. Should I followthe latest version released in march 2009 to use CMKL 9.0?

Thanks.

0 Kudos
1 Solution
103 Views
Hi,
The current version of TT support only 1D transform, but you could develop it yourself, just call 1D TT in parallel loop. But, if you want to get good performance you need to set ipar[9] by number of threads (more detailes could be found inIntel MKL Reference Manual chapter 13)
With best regards,
Alexander Kalinkin

View solution in original post

9 Replies
Gennady_F_Intel
Moderator
103 Views
I want to note that 9.0 version is no longer support. We'd recommend you to test the latest version 10.2 Update 6 we released at September this year or evaluate 10.3 beta.
--Gennady
103 Views
Hi,
Could you check your eigenvector by multyplication on your matrix. The first component of eigenvector you mention is equal zero (if i=1), so from first eqution you will got wrong result. May be "i" greater than 1?
With best regards,
Alexander Kalinkin
Chang_Lei
Beginner
103 Views
Ok, I'll try that.
Thanks.
Chang_Lei
Beginner
103 Views
Hi,
Could you check your eigenvector by multyplication on your matrix. The first component of eigenvector you mention is equal zero (if i=1), so from first eqution you will got wrong result. May be "i" greater than 1?
With best regards,
Alexander Kalinkin


Yes, the first eigenvalue is zero. This is something concerning singularity of poisson equation with Neumann boundary condition. That means if u is a solution, u+c is also solution. c is a constant.
With best regards.

103 Views
Hi,
I've understood the rootcase of problem. The matrix you mentioned isn't correspond to staggered cosine transform in our term. This matrix correspond tt_type = MKL_COSINE_TRANSFORM= 1, and eigenvalues of it could be calculated by next equation:
lambda(k)=(2.0D0*dsin(0.5D0*pi*(k-1)/n))**2.
This equation is the same with your2-2*cos((k-1)*pi/n)
With best regards,
Alexander Kalinkin
Chang_Lei
Beginner
103 Views
You are so nice and patient.
But I'm afraid that MKL_COSINE_TRANSFORM= 1 correspond to following matrix:
2,-2,0...
-1,2,-1,...
.....
..... -1,2,-1
......,0,2,-2
It's different from our matrix because the first and last row is twice. The eigenvalues and eigenvectors are different between two matrix.
It's so strange that I can use Numerical Recipes cosine transformer codes, cosft2, and get correct results, but cannot using TT routines. Our matrix is educed from three point finite difference of 1d poisson equation in staggered grid.
Best regards!
Chang_Lei
Beginner
103 Views
I know where the problem is now.
For staggered cosine transform, Forward transform of cosft2 (provided by Numerical Recipes) correspends with Backward transform provieded in MKL.
Another my question is how to do multi-column transform quickly. It seems that TT routines does not support multi-column transform.
Thanks all.
104 Views
Hi,
The current version of TT support only 1D transform, but you could develop it yourself, just call 1D TT in parallel loop. But, if you want to get good performance you need to set ipar[9] by number of threads (more detailes could be found inIntel MKL Reference Manual chapter 13)
With best regards,
Alexander Kalinkin

View solution in original post

Chang_Lei
Beginner
103 Views
Thanks. That's useful.
Reply