[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Error handling problem

From: Vicky Landsman
Subject: [Help-gsl] Error handling problem
Date: Mon, 3 Jul 2006 11:51:55 +0200

Greetings everyone, 
I am running a large simulation study on R (S-plus). My study requires a rather 
difficult integration. I perform it by use of C code which includes the call to 
the gsl library, function qags. 
Here is a relevant piece of code: 
/*C code for computing the denominator */


void Denom (double  *x,long    *n,
                                                long    *p,
                                                double  *params,
                                                double  *delta,
                                                double  *res )
        struct my_params my_p;
        double err;
        gsl_integration_workspace *w;
        gsl_function F;
        my_p.sigma  = *(params);
        my_p.gamma0 = *(params+1);
        my_p.alpha0 = *(params+2);  = *(delta);

          int i;
 for (i = 0;i < *n;i ++){
                my_p.alphaX = CreateAlphaX(i,x,n,p,params);
                my_p.bethaX = CreateBethaX(i,x,n,p,params);

Usually all goes fine. 
Sometimes, it happens that I receive the following message
gsl: qags.c:553: ERROR: bad integrand behavior found in the integration interval
Default GSL error handler invoked.
and the whole job is aborted. 

Could you help me please to catch this error but continue the program? I tried 
to follow your manuals but failed to apply your recommendations in my case. 

Much thanks, 
Victoria Landsman. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]