|
Memory allocation for large matrices: msg#00062lib.gsl.general
Hi There, I am trying to load a large matrix (180000*40) to GSL from a matrix. The data was first saved in Matrix "A" by first initiate "A" as double *A[180000]; for (i=0;i<180000;i++) A [i]=malloc(40*sizeof*A[i]); After reading values in to "A", I wanted to pass the values from "A" to a GSL matrix "B". gsl_matrix *B=gsl_matrix_alloc(180000,40); for (i=0;i<180000;i++) for (j=0;j<40;j++) gsl_matrix_set(B,i ,j,A[i][j]); I got an error message below each time the code reaches the gsl_marix_alloc line: Gsl:init_source.c :46: ERROR:failed to allocate space for block data Default GSL error handler invoked. I saw similar question posted before, but no answer yet. Is there any way to solve this problem by first define B as a gsl vector, then assign space for each element of the vector, similar to what I can do for a C matrix? I was not able to make it work so far. Any helps or suggestions are highly appreciated! Helena |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Custom structures containing gsl_vector: 00062, Daniel J Farrell |
|---|---|
| Next by Date: | Re: Memory allocation for large matrices: 00062, Tommy Nordgren |
| Previous by Thread: | Custom structures containing gsl_vectori: 00062, Daniel J Farrell |
| Next by Thread: | Re: Memory allocation for large matrices: 00062, Tommy Nordgren |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |