Random seed initialization
Janus Weil
janus@gcc.gnu.org
Sat Apr 6 15:44:00 GMT 2013
Hi,
> Using my build of GCC-4.9.0 20130324, each run produces always this
>
> $ ./rnd_init.out
> n= 12
> clock: 0
> seed: 0 37 74 111 148 185
> 222 259 296 333 370 407
> random: 0.301754534 0.380439878 0.926293135 0.672118008
> 0.237815678 0.638214409 0.320253670 0.351599574 0.865273237
>
> It seems the call to SYSTEM_CLOCK() is failing..
right, this clearly confirms my suspicion that it's a problem with SYSTEM_CLOCK.
>> Might be a platform-specific problem (with SYSTEM_CLOCK?!?) ...
>
> ... or my build of GCC is not so good (see above for configure options)...
I have exactly zero experience with building GCC under Windows/Cygwin,
so I'm not of much help here. Also I don't have a Windows installation
to check this, but maybe someone else can confirm this problem on
Cygwin?
It would also be helpful if you could use a newer Cygwin-provided
build of gfortran (if available), or try to build 4.7 or 4.8 yourself
(to check if it's a regression on trunk).
Cheers,
Janus
More information about the Fortran
mailing list