Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Is CMKL9.0 provides correct staggered cosine transforms?

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

Chang_Lei

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2010
02:19 AM

103 Views

Is CMKL9.0 provides correct staggered cosine transforms?

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.

1 Solution

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-31-2010
09:30 PM

103 Views

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

Link Copied

9 Replies

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2010
02:56 AM

103 Views

--Gennady

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2010
03:29 AM

103 Views

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2010
06:56 AM

103 Views

Ok, I'll try that.

Thanks.

Thanks.

Chang_Lei

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2010
07:01 AM

103 Views

Quoting Alexander Kalinkin (Intel)

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.

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-30-2010
01:44 AM

103 Views

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-31-2010
07:48 AM

103 Views

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-31-2010
09:16 PM

103 Views

For staggered cosine transform,

Another my question is how to do multi-column transform quickly. It seems that TT routines does not support multi-column transform.

Thanks all.

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-31-2010
09:30 PM

104 Views

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

Chang_Lei

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-31-2010
11:11 PM

103 Views

Thanks. That's useful.

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

For more complete information about compiler optimizations, see our Optimization Notice.