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
- Problem with MKL dpotrf function

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

schulzey

New Contributor I

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

12-09-2013
02:22 PM

104 Views

Problem with MKL dpotrf function

Can anyone see why I am getting all zeroes back in when calling the MKL dpotrf function below? Info comes back as 0 which indicates success, but A is ...

SUBROUTINE MatrixTest

IMPLICIT NONE

INCLUDE 'mkl.fi'

INTEGER n

PARAMETER (n=4)

REAL*8 A(n,n)

INTEGER info,i,j

c Fill the upper triangle

A(1,1)=11.0d0

A(1,2)=-5.0d0

A(1,3)=3.0d0

A(1,4)=2.0d0

A(2,2)=13.0d0

A(2,3)=4.0d0

A(2,4)=-6.0d0

A(3,3)=16.0d0

A(3,4)=7.0d0

A(4,4)=19.0d0

c Make it symmetrical

do i=2,n

do j=1,i-1

A(i,j)=A(j,i)

enddo

enddo

call dpotrf ('L',n,A,n,info)

end

Link Copied

4 Replies

Chao_Y_Intel

Employee

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

12-09-2013
09:25 PM

104 Views

Chao_Y_Intel

Employee

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

12-09-2013
09:25 PM

104 Views

mecej4

Black Belt

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

12-10-2013
04:35 AM

104 Views

The code posted by Schulzey merits a couple of comments.

First of all, the dpotrf routine is appropriate to use only if the matrix A is positive-definite -- it is necessary but not sufficient that A be symmetric. The particular matrix values do satisfy this requirement.

Secondly, only the lower triangle of A is used if the first argument passed to the routine dpotrf is 'L'. What is contained in the upper triangular part, not including the main diagonal, is immaterial. Therefore, there is no need for the "make it symmetrical" part of the posted code. It would be more efficient to fill in only the lower triangle of A if the intent is to call dpotrf with 'L' as the first argument.

schulzey

New Contributor I

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

12-10-2013
03:09 PM

104 Views

- 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.