Showing results for

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

Fedor_M_

Beginner

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

09-20-2016
02:32 AM

38 Views

MKL ?trexc function

Good day to all.

I am a student. I'm doing matrix calculations.

There was a problem with using the ?trexc function of MKL that makes the reordering of Schur factorization

In particular, with it's two last parameters: lapack_int* ifst, lapack_int* ilst.

I can't understand, how to makes this reordering step by step.

For example: I have the eigenvalues of matrix after Schur reordering: {198, 59, -47, -147}.

Then, after function ?trexc with parameters ifst = {4, 3, 2, 1}, ilst = {1, 2, 3, 4} I have the following reordering of EV:

{-147, 198, 59, -47}.

At first I thought, that i-st element of ifst become i-st element of ilst . By this logic it must be follows:

{198, 59, -47, -147} ---> {-147, -47, 59, 198}. But after ?trexc I have: {198, 59, -47, -147} ---> {-147, 198, 59, -47}.

In documentation written: "The element (or block) with row index `ifst` is moved to row `ilst` by a sequence of exchanges between adjacent elements (or blocks)". But I have tried to do it, and I have wrong results again.

Please, help me.

Best regards,

Fedor Malashin

Link Copied

2 Replies

Ying_H_Intel

Employee

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

09-25-2016
11:27 PM

38 Views

Hi Fedor,

Good day, please see the answer from our developer:

First of all, parameters IFST and ILST of ?TREXC are integer scalars (not arrays).

So in this example ?TREXC is called with IFST = 4 and ILST = 1 since it reads only one element from each of the pointers and the rest 3 elements are ignored.

Documentation says that IFST is move to ILST by **adjacent** exchanges like that:

Initial state:

ev1 = 198

ev2 = 59

ev3 = -47

ev4 = -147

After exchange **ev4** with ev3:

ev1 = 198

ev2 = 59

ev3 = -147

ev4 = -47

After exchange ev3 with ev2:

ev1 = 198

ev2 = -147

ev3 = 59

ev4 = -47

After final exchange ev2 with **ev1**:

ev1 = -147

ev2 = 198

ev3 = 59

ev4 = -47

that is why the output is like {-147, 198, 59, -47}.

Best Regards,

Ying

Fedor_M_

Beginner

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

09-26-2016
11:30 PM

38 Views

Hi, Ying.

Thank you for your answer.

I understood this.

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