Alberto and Fred,
Thanks for the advice. I took Fred's approach to the problem which was to
insert my own random number generator instead of relying on the intrinsic
generator, which might be different in the Workshop 4.2 and 5.0 versions.
I used a two-line random number generator described in "Numerical Recipes"
[jran=mod(jran*ia+ic,im); ran=float(jran)/float(im)]. This produced
identical results using an IBM compiler and the two Sun compilers. Thus I
think I have eliminated different random number generators as the
difference between the two compilers. However, the intrinsic generators in
version 4.2 and 5.0 do seem to produce different numbers for the same
initial conditions (I'm not entirely sure that I've determined this
conclusively; my focus was on getting identical results somehow).
I finally got a call from Sun support very late yesterday. The only action
out of this discussion was the conclusive determination that the latest
patch has not been applied to the 5.0 compiler. I presume our system
administrator will do this soon, probably while I'm on travel during the
next week.
In the meantime, I've switched to using IBM and DEC computers, and I'm
focused on doing science again. I remain puzzled about the Sun compiler
differences but I can't apply the patches myself, I can't find solid
information about either compiler, and I can't call tech support unless I
go through a designated contact. If I learn something interesting about
this problem I will report back to the forum.
One of my colleagues has unearthed information about several random number
generators. I probably will begin to use one of the better ones so that I
know how my random numbers were generated. However, I've returned to my
original viewpoint that my scientific problem is not overly sensitive to
the randomness of the pseudo-random numbers.
Harry
At 05:40 AM 03/28/2000 -0800, Alberto Fasso' wrote:
>I suggest that instead of the intrinsic random number generators
>provided by the two compilers, you use the same external generator
>in both cases. There are some good ones, see for instance:
>
>http://www.honeylocust.com/RngPack/doc/edu.cornell.lassp.houle.RngPack.Ranm
>ar.html
>
>Intrinsic random number generators have never had a very good reputation
>anyway, at least in the past. Has anybody done some tests about those
>available in Fortran 90 compilers?
>
>Alberto Fasso'
>
>On Tue, 28 Mar 2000, Hjalmarson, Harold P. wrote:
>
> > Hello,
> >
> > For a certain Fortran 90 calculation I get very different results
> depending
> > on whether I use Sun Workshop 4.2 or 5.0. The 4.2 results seem to be
> > correct, and they agree with results using a DEC computer.
> >
> > The calculation is a Monte Carlo solution of the Boltzmann equation for
> > electric field driven transport in GaAs.
> >
> > I suspect that the error may arise in the intrinsic random number
> generator
> > random_number. Perhaps it is implemented differently in Workshop 4.2 and
> > 5.0? However, I don't see why a different implementation would cause the
> > large effects I see in the final results.
> >
> > All of my source code is identical for these two calculations.
> >
> > Any comments about known problems would be much appreciated because it can
> > be difficult to compare "identical" probabilistic calculations.
> >
> > Meanwhile I will look into reviving some code that I used long ago to test
> > random number generators.
> >
> > Harry
> >
> > ---
> > Harold P. Hjalmarson
> > (Materials Simulation Sciences, Dept. 9225)
> > Sandia National Labs, MS-1111, PO Box 5800, Albuquerque, NM 87185-1111
> > [log in to unmask] (Internet) 505-844-8888 (office) 505-845-7442 (fax)
>
>
>--------------------------------------------------
>Alberto Fasso'
>Stanford Linear Accelerator Center
>Radiation Physics Dept. ms 48
>2575 Sand Hill Road
>Menlo Park, CA 94025
>
>Tel. (1 650) 926 4062 Fax: (1 650) 926 3569
---
Harold P. Hjalmarson
(Materials Simulation Sciences, Dept. 9225)
Sandia National Labs, MS-1111, PO Box 5800, Albuquerque, NM 87185-1111
[log in to unmask] (Internet) 505-844-8888 (office) 505-845-7442 (fax)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|