Segmentation fault while matrix multiplication using openMp?

I assume that your "matrix" is an array of pointers to the actual matrix' rows, something like.

Up vote 1 down vote favorite share g+ share fb share tw.

My matrix multiplication code is int matMul(int ld, double** matrix) { //local variables initialize omp_set_num_threads(nthreads); \#pragma omp parallel private(tid,diag,ld) shared(i,j,k,matrix) { /* Obtain and print thread id */ tid = omp_get_thread_num(); for ( k=0; k.

Tell us where the segv is. Tell us which compiler you are using. – bmargulies Mar 27 '10 at 0:28.

I assume that your "matrix" is an array of pointers to the actual matrix' rows, something like: double *matrixNROWS; for (i = 0; I.

I ran into the same problem while compiling my code under Linux using GCC 4.2. The line that is causing the problem is: omp_set_num_threads(nthreads); You should try to set the number of threads by specifying it under pragma omp for: #pragma omp for num_threads(nthreads) Hope it helps!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions