Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] adbr_v1_0.gz(7 Kbytes)
Manuscript Title: A Fortran 90 interface to random number generation.
Authors: M. Hennecke
Program title: random__module
Catalogue identifier: ADBR_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 90(1995)117
Programming language: Fortran.
Word size: 32
Keywords: Computers, Computer languages, Random number generators, Fortran 90.
Classification: 6.2.

Nature of problem:
Any Fortran 90 program requiring uniform pseudorandom numbers, for example Monte Carlo simulations.

Solution method:
MODULE procedures with the names, calling sequences and semantics of the intrinsic random number generation procedures are provided, which take precedence over the intrinsic routines when USEd in a Fortran 90 program. This module is intended as a template for users or developers who want to make their own random number generators available in Fortran 90.

Unusual features:
The specification of a user interface to random number generators in the Fortran 90 standard lays the ground for a common calling sequence to be used for arbitrary generator algorithms. This makes the replacement of a specific generator much easier than before, where many different methods to call random number generators coexisted.

Running time:
Time required by the user-supplied generator, a subroutine call and a RESHAPE if the array to be filled has rank >= 2.

[1] American National Standards Institute (ANSI). Programming Language Fortran. ANSI X3.198-1992; also ISO/IEC 1539:1991.