[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
CULA • View topic - problem with culaSsyevx
Page 1 of 1

problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 8:27 am
by tehver
Hello,

We cannot get culaSsyevx to work. It returns nothing for eigenvalues or eigenvectors. Note that culaSsyev works just fine for us.

We are using Ubuntu 11.04, CUDA 4.0, CULA R12 Linux 64 bit Premium.
Here is our code that gives the correct eigenvalues and eigenvectors when we use culaSsyev. For culaSsyevx, it returns all zero eigenvalues and eigenvectors.

Here is the code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cula.h>

int main(){
int N = 10;
int* c=NULL;
int* m=NULL;
float* A=NULL;
float* B=NULL;
float* d=NULL;
float vl=-100.0, vu=100.0;
int il=1, iu=10;
float abstol=0.0;

int M=N;

A = (float*)malloc(M*N*sizeof(float));
B = (float*)malloc(M*N*sizeof(float));
d = (float*)malloc(N*sizeof(float));
c = (int*)malloc(N*sizeof(float));

for (int i=0; i<N; i++) d[i]=1;

culaInitialize();
memset(A, 0, M*N*sizeof(float));
memset(B, 0, M*N*sizeof(float));

for (int i=0; i<M*N; i++) A[i]=i;
printf("A={\n");
for (int i=0; i<M*N; i++) {
printf("%3.2f ", A[i]);
if (!((i+1)%N)) printf("\n");
}
printf("}\n");

//culaSsyev ('V', 'U',N,A,N, d );
culaSsyevx('V','A','U',N,A,N,vl,vu,il,iu,abstol,m,d,A,N,c);

culaShutdown();

printf("eigenvalue={ ");
for (int i=0; i<N; i++) {
printf("%3.2f ", d[i]);
}
printf("}\n");
printf("eigenvectors={\n");
for (int i=0; i<N*M; i++) {
printf("%3.2f ", B[i]);
if (!((i+1)%N)) printf("\n");
}
printf("}\n");

for (int i=0; i<N; i++) if (c[i]!=0) printf("failed at %d!\n",i);
}

I would really appreciate your help.
Thank you very much!

Re: problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 10:03 am
by kyle
Looks like you are reading and writing to A at the same time.

culaSsyevx('V','A','U',N,A,N,vl,vu,il,iu,abstol,m,d,A,N,c);

Re: problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 10:21 am
by tehver
Sorry, we were trying different things and I copied the wrong version. When the call reads:

culaSsyevx('V','A','U',N,A,N,vl,vu,il,iu,abstol,m,d,B,N,c);

We still have a B populated with nothing (all zeroes).

Thanks again!

Re: problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 11:17 am
by john
Have you checked the return code from your syevx call? The status returned might be indicating a problem.

Re: problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 12:32 pm
by tehver

Re: problem with culaSsyevx

PostPosted: Thu Jul 07, 2011 12:59 pm
by kyle

Re: problem with culaSsyevx

PostPosted: Fri Jul 08, 2011 7:18 am
by tehver
Thanks a million! That was it.