Random seed initialization

Angelo Graziosi angelo.graziosi@alice.it
Thu Apr 11 11:19:00 GMT 2013


Ciao Tobias,

Il 11/04/2013 11.58, Tobias Burnus ha scritto:
> Angelo Graziosi wrote:
>> A new GCC 4.7.2 has been released
>> (http://cygwin.com/ml/cygwin/2013-04/msg00170.html),
>> but the problems described in this thread still remain.
>
> Can you try the attached program? Run it a couple of time and check the
> output. On my system, I can simply use:
>
> $ gcc test.c && ./a.out
> gettimeofday:  err=0, secs=1365674085, usecs=67639
> clock_gettime: err=0, secs=1365674085, usecs=67683
> time:          err=0, secs=1365674085, usecs=0
> clock_gettime: err=0, secs=9343, nsecs=0, tck=1000000000

It builds OB and the result is:

$ ./a.exe
gettimeofday:  err=0, secs=1365678623, usecs=437500
clock_gettime: err=0, secs=1365678623, usecs=437500
time:          err=0, secs=1365678623, usecs=0
clock_gettime: err=0, secs=0, nsecs=0, tck=1000000000

$ ./a.exe
gettimeofday:  err=0, secs=1365678667, usecs=484375
clock_gettime: err=0, secs=1365678667, usecs=484375
time:          err=0, secs=1365678667, usecs=0
clock_gettime: err=0, secs=0, nsecs=0, tck=1000000000

$ ./a.exe
gettimeofday:  err=0, secs=1365678671, usecs=531250
clock_gettime: err=0, secs=1365678671, usecs=531250
time:          err=0, secs=1365678671, usecs=0
clock_gettime: err=0, secs=0, nsecs=0, tck=1000000000

$ ./a.exe
gettimeofday:  err=0, secs=1365678673, usecs=968750
clock_gettime: err=0, secs=1365678673, usecs=968750
time:          err=0, secs=1365678673, usecs=0
clock_gettime: err=0, secs=0, nsecs=0, tck=1000000000

[wait]

$ ./a.exe
gettimeofday:  err=0, secs=1365678799, usecs=968750
clock_gettime: err=0, secs=1365678799, usecs=968750
time:          err=0, secs=1365678799, usecs=0
clock_gettime: err=0, secs=0, nsecs=0, tck=1000000000


Ciao,
  Angelo.



More information about the Fortran mailing list