#include #include #include #include #include double d_t (struct timespec t1, struct timespec t2){ return ((t2.tv_sec - t1.tv_sec) + (double) (t2.tv_nsec - t1.tv_nsec) / 1000000000.0); } int main (int argc, char *argv[]){ double a, b; int i,j,k; int n=atoi(argv[1]), seed=atoi(argv[2]), nt=atoi(argv[3]); printf("\nn\t= %d", n); printf("\nseed\t= %d", seed); printf("\nnt\t= %d", nt); struct timespec t1, t2, t3, t4; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t1); //initialize gsl random number generator const gsl_rng_type *rng_t; gsl_rng *rng; gsl_rng_env_setup(); rng_t = gsl_rng_default; rng = gsl_rng_alloc (rng_t); clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t2); for (i=0;i