- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Well, i am starting with MKL, using C++, and I test the "dsyevr " of Lapack, to compute the eigenvalues of a matrix, but i was "shock" when I try a matrix with dimension bigger or equal than 710, after that the program said "segmentation fault", but when I use a matrix of 709 it works, really good... so my question is that if the command "dsyevr" has a limitation for the size of the matrix to calculate the corresponding EV
The part of the code is :
N=709
[cpp] char jobz = 'N';
char range = 'A';
char uplo = 'U';
int n = N;
double H;
int lda = N;
int lwork = 26*N;
double vl, vu;
int il, iu;
double abstol = 1.0;
int m;
double w;
double z;
int isuppz;
int ldz = N;
double work[lwork];
int liwork = 10*N;
int iwork[liwork];
int info;
dsyevr(&jobz, &range, &uplo, &n, *H, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, *z, &ldz, &isuppz, work, &lwork, iwork,&liwork, &info);[/cpp]
Thanks in advances
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
As you have neglected to mention the subject, we might guess that you haven't considered stack size settings or the possibility of an Intel compiler heap-arrays option. There certainly is no set limit such as you mention; the default is likely to be different among various operating systems.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
stack size settings or the possibility of an Intel compiler heap-arrays option
What do you mean with that?, because I didn't understand..
I am declared noob with this...
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
and me too!! XD!!
I'll just computed the eigenvalues for a 3k*3k matrix, in 10 , now the final frontier are the eigenvectors, it's a little messy....
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
[cpp] //Values for dsyevr
char jobz = 'N';
//char jobz = 'V';
char range = 'A';
char uplo = 'U';
int n = 1000;
int n2 = 2*n;
double *H = new double[n*n];
int lda = n;
int lwork = 26*n;
double vl, vu;
int il, iu;
double abstol = 1e-8;
int m = n;
int m2= 2*m;
int ldz = n;
//int ldz = n-1;
double *w= new double;
double *z= new double[ldz*m];
int isuppz;
//int *isuppz= new int[m2];
double *work = new double[lwork];
int liwork = 10*n;
int *iwork = new int[liwork];
//So at least we use MKL to compute the matrix eigenvalues
dsyevr(&jobz, &range, &uplo, &n, H, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, &isuppz, work, &lwork, iwork,&liwork, &info);
//dsyevr(&jobz, &range, &uplo, &n, H, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, isuppz, work, &lwork, iwork,&liwork, &info);
[/cpp]
So i build the the program this way but i can't get the eigenvectors, I tried with the lines "commented", but didn't work... what should I do??
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Do you have other expectations?
Did you try other math libraries for such kind calculations?
Which CPU type are you running?
--Gennady
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Do you have other expectations?
Did you try other math libraries for such kind calculations?
Which CPU type are you running?
--Gennady
1.- Yes, I would like to use mkl for lineal calculus, I'am physics.. and I need to compute almost everyday, lineal problems, but restricted to low dim matrix due to computational power, that's because we use high level languages, the're easy to use but highly resource dependant.. not like c++.
And related to last sentence, because they're highly optimized for Intel processors...
2.- No, i didnt tried with other mkl libraries, this is my first time with this... and has been.. painful... very painful and also frustratitng... (moral level -100.0)
3.- I'm running on a quadcore Q9400 (just buyed.. wiii!!!!.... lol)
that's it's
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
and me too!! XD!!
I'll just computed the eigenvalues for a 3k*3k matrix, in 10 , now the final frontier are the eigenvectors, it's a little messy....
Looks Good
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
My code is copy from gatts like that:
int nn = 500;
double* cov = new double[500*500];
FILE* fid = fopen("I:\cov500.dat", "rb");
fread(cov, sizeof(double), 500*500, fid);
fclose(fid);
char jobz = 'V';
char range = 'A';
char uplo = 'U';
double vl = 0.0, vu = 0.0;
int il = 0, iu = 0;
int lda = 500;
double abstol = 1e-8;
int lwork = 26*500;
int m = 500;
int ldz = 500;
double *w= new double[500];
double *z= new double[500*500];
int isuppz;
double *work = new double[lwork];
int liwork = 10*500;
int *iwork = new int[liwork];
int info;
dsyevr(&jobz, &range, &uplo, &nn, cov, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, &isuppz, work, &lwork, iwork,&liwork, &info);
I cannot get the right eigen vectors!
Somebody save me, please!
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
double precision , dimension(0:17):: ev
double precision , dimension(1:18,1:18):: evect
double precision , dimension(0:17,0:17):: ttt
integer iwork(18*10), status, support(2*18)
toff=18
do 120 i=0, toff-1
do 120 j=9, toff-1
ttt(i,j)=1.d0
write(*,*) i,j,ttt(i,j)
120 continue
call dsyevr('v','a','l',toff,ttt,toff,0.d0,0.d0,0,0,dlamch('s'),
1 i,ev,evect,toff,support,work,toff*64,iwork,toff*10,status)
ifort -O3 -fno-alias -heap-arrays 10 -align -132 -u -w90 -o honeyN3L80 test.o -L/usr/local/intel/mkl/10.0.4.023/lib/em64t -lguide -lmkl -lmkl_lapack -lpthread
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
double precision , dimension(0:17):: ev
double precision , dimension(1:18,1:18):: evect
double precision , dimension(0:17,0:17):: ttt
integer iwork(18*10), status, support(2*18)
toff=18
do 120 i=0, toff-1
do 120 j=9, toff-1
ttt(i,j)=1.d0
write(*,*) i,j,ttt(i,j)
120 continue
call dsyevr('v','a','l',toff,ttt,toff,0.d0,0.d0,0,0,dlamch('s'),
1 i,ev,evect,toff,support,work,toff*64,iwork,toff*10,status)
ifort -O3 -fno-alias -heap-arrays 10 -align -132 -u -w90 -o honeyN3L80 test.o -L/usr/local/intel/mkl/10.0.4.023/lib/em64t -lguide -lmkl -lmkl_lapack -lpthread
anybody there that can help?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
It includes the steps on registration on the Beta. Feel free to let us know if you get any problem.
-- Gennady
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable