## Problem with tiled Cholesky decomposition

Open forum for general discussions relating to PLASMA.

### Problem with tiled Cholesky decomposition

I have a problem with PLASMA_sposv_Tile function from PLASMA library, which is used to run tiled Cholesky decomposition algorithm. I haven't found any reasonable example that would make use of this function, but I may miss something.

A minimal (non)working example is below:
Code: Select all
`#include <stdio.h>#include <string.h>#include <stdlib.h>#include <assert.h>#include <plasma.h>static void pexit(const char *msg){    perror(msg);    exit(1);}PLASMA_desc* set_plasma_desc(double *a, int n, int b) {   PLASMA_desc* tiled_a = malloc(sizeof(PLASMA_desc));   int p = n / b;   if (PLASMA_Desc_Create(&tiled_a, a, PlasmaRealDouble, b, b, b * b, n, n, 0, 0, n, n) != PLASMA_SUCCESS) {      pexit("PLASMA_Desc_Create");   }   return tiled_a;}void print(double *a, int n) {   int i, j;   for (i = 0; i < n; i++) {      for (j = 0; j <= i; j++) {         printf ("%lf ", a[i * n + j]);      }      printf ("\n");   }}int main(){   int cores = 2, n = 4, b = 2;   int i, j;    double A[] = {18,  22,  54,  42,              22,  70,  86,  62,              54,  86,  174, 134,              42,  62,  134, 106};    double L[16];   PLASMA_desc *tiles_in, *tiles_out;   int ret;   if (PLASMA_Init(cores) != PLASMA_SUCCESS) {      pexit("PLASMA_Init");   }   tiles_in = set_plasma_desc(A, n, b);   tiles_out = set_plasma_desc(L, n, b);   print(A, n);   if ((ret = PLASMA_sposv_Tile(PlasmaLower, tiles_in, tiles_out) != PLASMA_SUCCESS)) {      pexit("PLASMA_sposv_Tile");   }   print(L, n);   PLASMA_Desc_Destroy(&tiles_out);   PLASMA_Desc_Destroy(&tiles_in);   return 0;}`

When I execute the code it appears that PLASMA_sposv_Tile function returns 1. The documentation says that this is the case when the matrix leading minor is not positive definite. However, all minors of A are positive.
Any ideas about how to fix this code?
pzvpzv

Posts: 1
Joined: Wed Sep 18, 2013 9:07 pm