fprintf(stderr,...) output in GSL routines (gsl_rng_env_setup)

Brian Gough bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001


Peter Teuben writes:
 >  A philosphical question: I have been using a few gsl routine and
 > replacing some of my own old codes. I like gsl, i certainly like to
 > see more! But one thing that I found a bit of a nuisance is that
 > there is sometimes some surprising fprintf(stderr,.....) calls in
 > some routines. Actually, I only ran into one so far, the RNG setup
 > routine, gsl_rng_env_setup.
 >  I happen to prefer to pass parameters via functions, not via
 > environment variables, but that can be solved with putenv(), which

The environment variables are completely optional -- they are only
used if you explicitly call gsl_rng_env_setup().  You can set the
parameters by direct assignment in C.  e.g.

#include <gsl/gsl_rng.h>

int main () {
       ....
        gsl_rng_default_seed = 123;
        gsl_rng_default_type = gsl_rng_ran3 ; 


regards
Brian



More information about the Gsl-discuss mailing list