help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] gsl_rng_alloc causing crash


From: mike cantor
Subject: [Help-gsl] gsl_rng_alloc causing crash
Date: Tue, 10 Jan 2006 16:22:00 -0800

Hi,

I am using gsl_rng_alloc in a C-coded python extension on windows XP (gsl ver 1.6). The extension compiles and links fine but any call to gsl_rng_alloc causes a fatal error. For instance, the example code the gsl documentation (plus a few inserted printfs)

        gsl_rng * r;
        const gsl_rng_type * T;
        gsl_rng_env_setup();
        T = gsl_rng_default;
        printf("about to initialize\n");
        r = gsl_rng_alloc (T);
        printf("initialized\n");

crashes having displayed "about to initialize" but before displaying "initialized." I have tried a number of things, including (1) writing it with and without the rng_env_setup() call (2) using different rngs (e.g. gsl_rng_mt19937), (3) setting windows environment variables for GSL_RNG_TYPE and GSL_RNG_SEED and using the corresponding type in the call to gsl_rng_alloc. In all cases, the program crashes at the alloc call.

Any suggestions???

Thanks,
-mike

p.s. One additional piece of information: if I use

printf ("seed = %lu\n", gsl_rng_default_seed);

The seed printed is not what is set in the ENV var GSL_RNG_SEED
One other piece of information






reply via email to

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