rng_seed Function

public function rng_seed() result(seed)

Generates random 32-bit integer seed from /dev/urandom

Arguments

None

Return Value integer(kind=Int32)

Seed value


Called by

proc~~rng_seed~~CalledByGraph proc~rng_seed rng_seed proc~rng_init rng_init proc~rng_init->proc~rng_seed proc~read_inputs read_inputs proc~read_inputs->proc~rng_seed proc~get_nlaunch get_nlaunch proc~get_nlaunch->proc~rng_init proc~get_nlaunch_pass_grid get_nlaunch_pass_grid proc~get_nlaunch_pass_grid->proc~rng_init program~fidasim fidasim program~fidasim->proc~read_inputs proc~pnpa_f pnpa_f program~fidasim->proc~pnpa_f proc~dcx dcx program~fidasim->proc~dcx proc~fida_weights_mc fida_weights_mc program~fidasim->proc~fida_weights_mc proc~fida_f fida_f program~fidasim->proc~fida_f proc~npa_f npa_f program~fidasim->proc~npa_f proc~halo halo program~fidasim->proc~halo proc~pfida_f pfida_f program~fidasim->proc~pfida_f proc~pnpa_f->proc~get_nlaunch_pass_grid proc~dcx->proc~get_nlaunch proc~fida_weights_mc->proc~get_nlaunch proc~fida_f->proc~get_nlaunch proc~npa_f->proc~get_nlaunch proc~halo->proc~get_nlaunch proc~pfida_f->proc~get_nlaunch_pass_grid

Contents

Source Code


Source Code

function rng_seed() result (seed)
    !+ Generates random 32-bit integer seed from `/dev/urandom`
    integer(Int32) :: seed
        !+ Seed value

    open(89, file="/dev/urandom", access="stream", form="unformatted", action="read", status="old")
    read(89) seed
    close(89)
    seed = abs(seed)

end function rng_seed