[help-gsl] Re: Fw : Re: segmentation fault using qag.h with GSL (2008-08-12)
|
From: |
Thomas Weber <thomas.weber.mail@.........> |
|
Subject: |
Re: Fw : Re: segmentation fault using qag.h with GSL |
|
Date: |
Tue, 12 Aug 2008 11:38:38 +0200 |
|
To: |
chadiakanaan@........ |
|
Cc: |
help-gsl@gnu.org |
Am Dienstag, den 12.08.2008, 08:52 +0000 schrieb chadia kanaan:
>
> --- En date de : Mar 12.8.08, chadia kanaan <chadiakanaan@........> a Ãcrit :
> De: chadia kanaan <chadiakanaan@........>
> Objet: Re: [Help-gsl] segmentation fault using qag.h with GSL
> Ã: "Thomas Weber" <thomas.weber.mail@.........>
> Date: Mardi 12 AoÃt 2008, 11h49
>
> Dear Thomas,
>
> I re-enclose again the error file concerning the debugging in a plain
> text format ( for the convenience of kind users that may help me ).
> You'll find also attached the code file "code.c" . I really appreciate
> your help, many thanks, also for Joel :
Line 31 from gsl's integration/initialise.c:
workspace->rlist[0] = 0.0;
Okay, let's look at your workspace w (code edited for the mail)
double p_simfunc(double z, int SFR_index)
{
double p_sim ;
double int_p_unor, err;
/*normalize p_unor*/
gsl_integration_workspace *w =
gsl_integration_workspace_alloc(10000);
gsl_integration_workspace_free(w);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
If you want to use your workspace, you shouldn't free it right after
allocating :)
Thomas