This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Random seed initialization
- From: Angelo Graziosi <angelo dot graziosi at alice dot it>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Janus Weil <janus at gcc dot gnu dot org>, fortran <fortran at gcc dot gnu dot org>, dave dot korn dot cygwin at gmail dot com
- Date: Thu, 11 Apr 2013 13:18:21 +0200
- Subject: Re: Random seed initialization
- References: <51603400 dot 3030705 at alice dot it> <CAKwh3qgG=pPbKyE6YT8H9++E_74uKmFC0UKG+Q3cW8bxYHVHRw at mail dot gmail dot com> <51603FEF dot 9020300 at alice dot it> <516042C9 dot 9010002 at alice dot it> <CAKwh3qgKztRYUGh-OjsRatsEqK=TmAF2+62S3jQfd8DkhUYi-Q at mail dot gmail dot com> <51604788 dot 3020603 at alice dot it> <CAKwh3qg0x2=b+QpKvzGSU36sKc_C6BcUs13mT0=-jxG-HnaU4g at mail dot gmail dot com> <51667E13 dot 7040300 at alice dot it> <5166894C dot 4050804 at net-b dot de>
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.