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 just full of zeroes. What am I missing?
I have set it up in Visual Studio 2010 as a 32-bit application as follows:
Fortran => Libraries => Use Intel Math Kernel Library = Sequential
Linker => General => Additional Library Directories = C:\Progra...
c Fill the upper triangle
c Make it symmetrical
call dpotrf ('L',n,A,n,info)
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.