Turn on suggestions

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
- Permutation vector for dgetrf

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

Jason_Jones1

Beginner

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

03-15-2010
02:09 PM

152 Views

Permutation vector for dgetrf

I am having trouble with the output *ipiv* from dgetrf. My understanding is that it should return an array the length of the number of rows of my input matrix. Each member of this array should contain a different number. These numbers are the column in which a 1 would be placed for the corresponding column i.e. if:

ipiv =

1

4

5

2

3

This would correspond to a permutation matrix that looks like:

1 0 0 0 0

0 0 0 1 0

0 0 0 0 1

0 1 0 0 0

0 0 1 0 0

And that this permutation matrix P*X(my input matrix) = L*U. However, the ipiv outputs I get from dgetrf have many repetititions such as the output below and P*X != L*U:

ipiv = 4

ipiv = 2

ipiv = 4

ipiv = 4

ipiv = 5

Here is my example program:

#define M 5#define N 5

int main()

{

int i,m, n, *ipiv, info;

double a[M*N] = { 3, 4, 6, 8, 2, 2, 9, 6, 1, 8, 12, 8, 4, 6, 2, 6, 6, 7, 1, 2, 9, 4, 3, 2, 8 };

ipiv = malloc(M*sizeof(int));

m = M;

n = N;

info = 0;

dgetrf(&m,&n,a,&m,ipiv,&info);

printf("info = %d\\n",info);

for (i=0;i

printf("ipiv = %d\\n",ipiv

}

return(0);

}

Thanks!

Link Copied

2 Replies

TimP

Black Belt

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

03-17-2010
10:56 AM

152 Views

swap rows 1 and 4

continue processing

swap rows 3 and 4 (which was originally row 1)

continue...

The swap vector is intended to be used only by the companion BLAS functions.

Jason_Jones1

Beginner

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

03-17-2010
04:20 PM

152 Views

Yes, that works. Thank you!

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

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