|
Problem with gsl_rng_alloc: msg#00034lib.gsl.general
Hi all, I have a problem when I try to use random number generation. Here is my code: unsigned long int seed; #ifdef __WINDOWS__ seed = unsigned long int(GetTickCount()); std::cout << "Windows !" << std::endl; std::cout << seed << std::endl; #endif #ifdef __LINUX__ struct timeval tv; gettimeofday(&tv,0); seed = tv.tv_sec + tv.tv_usec; #endif #ifdef __MAC__ struct timeval tv; gettimeofday(&tv,0); seed = tv.tv_sec + tv.tv_usec; #endif // Initialisation de l'environnement GSL pour la generation de nombres aleatoires gsl_rng_env_setup(); GSL_RNG_TYPE_ = gsl_rng_taus; // in the hpp : const gsl_rng_type *GSL_RNG_TYPE_; GSL_RNG_ = gsl_rng_alloc (gsl_rng_taus); // run-time error here ! gsl_rng_set(GSL_RNG_,seed); Can you tell me what is the problem ? Regards -- Le temps des cerises reviendra. Dans l'immédiat, c'est le temps des noyaux. Courage. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Runtime error, Segmentation fault.: 00034, Thomas Weber |
|---|---|
| Next by Date: | Re: Problem with gsl_rng_alloc: 00034, Olivier Tournaire |
| Previous by Thread: | Runtime error, Segmentation fault.i: 00034, Jo_Jo |
| Next by Thread: | Re: Problem with gsl_rng_alloc: 00034, Olivier Tournaire |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |