I'm an instructor for a course using IFC on redhat linux. We recently had a project that involved doing a simulation,
using the built in random number generator.
We quickly found that RANDOM_SEED puts the generator in the same state on every run of the program. Not really what we wanted, so I tried to write a subroutine that, given a magic number would initialize the RNG with that number as a 'seed' (choosing 1 of 2**32 different sequences). I was not able to get this to work in IFC (I had no trouble with another fortran compiler on adifferent platform).
What I tried was this, and I'm baffled as to why it wouldn't work. I called RANDOM_SEED with size, to get the seed size; allocated an array of that size (which is 47!); filled it with a deterministic sequence based on the magic number, then called RANDOM_SEED with put to use that sequence to seed the random number generator.
The results were rather astounding. Subsequent calls to RANDOM_NUMBER sinply produced a sequence like x_new = x_old + .19, modulo 1.0. (.19 is not the actualy number, but is close to it as best I recall).
Investigating further, I did a call RANDOM_SEED with get after each call to RANDOM_NUMBER. I saw that the 47th value in the array was just increasing by .19/2**32. The other 46 numbers had two that were just decreasing by 1 on each call. The rest of them seemed to be filling up with -6.
Anyway, I feel one shouldn't expect to have to dig that deeply to seed a random number generator. I could have easily implemented a PRNG from scratch in the same amount of time. And if I don't get an answer, that's what I will do next semester. However, I still would like to understand what the correct way to do this is, in a manner that will work on any compiler, but especially on IFC.