I am using clapack/cblas through ATLAS and coding in C. I don't get any error messages, but after using both dgetrf and dgetri (pretty sure correctly) I get the inverse being a zero matrix. I am operating here in the integer ring 11862379. The code works with smaller numbers, but I need to be in this field for the program to be worth anything. Here is my code:
#include <stdio.h>
#include <stlib.h>
#include <math.h>
#include <cblas.h>
#include <clapack.h>
const int n = 3;
int main() {
double b[n*n]; double binv[n*n]; int ipiv[n*n];
RandomCirculant(b); //this works, and I dont feel like writing it all out again here
cblas_dcopy(n*n, b, 1, binv, 1);
int info = clapack_dgetrf(CblasRowMajor, n, n, binv, n, ipiv);
if (info == 0)
clapack_dgetri(CblasRowMajor, n, binv, n, ipiv);
return 0;
}

