by guillaume_bs » Wed Apr 16, 2008 2:39 pm
Bonjour Julie
Thank you for your answer.
I corrected my mistake ; my bug stopped, but now, when I go into the dgeev routine, it just runs endlessly (on the 2nd entry, when i give the size of the workspace).
Do you have any idea?
Here is my modified code :
{
int info;
double *w, *vect1, *vect2, *wr, *wi;
int c_m1;
char yes;
int dim = 4;
int worksize_int;
double worksize_double;
double matrice[16] ={43,216,254,249,49,198,193,211,48,194,177,171,46,214,225,169};
yes = 'V';
c_m1 = -1;
vect1 = (double *) malloc(dim * dim * sizeof(double));
vect2 = (double *) malloc(dim * dim * sizeof(double));
wr = (double *) malloc(dim * sizeof(double));
wi = (double *) malloc(dim * sizeof(double));
dgeev_(&yes, &yes, &dim, matrice, &dim, wr, wi, vect1, &dim, vect2, &dim, &worksize_double, &c_m1, &info);
worksize_int = (int)worksize_double;
w = (double *) malloc(worksize_int * sizeof(double));
// here is the bug:
dgeev_(&yes, &yes, &dim, matrice, &dim, wr, wi, vect1, &dim, vect2, &dim, w, &worksize_int, &info);
free(vect1); free(vect2); free(w);
return info;
}