M_uuid Module

generate_uuid(3f) was originally derived from the xmlf90 codebase, (c) Alberto Garcia & Jon Wakelin, 2003-2004. It also calls RNG routines from Scott Ladd scott.ladd@coyotegulch.com, and the libFoX modules. Although some sections have been replaced, generate_uuid(3f) was originally based on the libFoX version, with licensing as follows:

 (c) 2005-2009 Toby White <tow@uszla.me.uk>
 (c) 2007-2009 Gen-Tao Chiang <gtc25@cam.ac.uk>
 (c) 2008-2012 Andrew Walker <a.walker@ucl.ac.uk>

All rights reserved.

  • Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

    This software is provided by the copyright holders and contributors “AS IS” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. in no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

NAME

M_uuid(3f) - [M_uuid::INTRO] a module of UUID (Universally Unique IDentifier) procedures
(LICENSE:BSD-4-Clause)

SYNOPSIS

use M_uuid, only : generate_uuid

QUOTE

Remember you are unique, just like everyone else.

DESCRIPTION

A universally unique identifier (UUID) is a 128-bit number used to
identify information in computer systems.

When generated according to the standard methods, UUIDs are for
practical purposes unique, without depending for their uniqueness
on a central registration authority or coordination between the
parties generating them, unlike most other numbering schemes. While
the probability that a UUID will be duplicated is not zero, it is
close enough to zero to be negligible.

Thus, anyone can create a UUID and use it to identify something with
near certainty that the identifier does not duplicate one that has
already been or will be created to identify something else. Information
labeled with UUIDs by independent parties can therefore be later
combined into a single database, or transmitted on the same channel,
without needing to resolve conflicts between identifiers.

Adoption of UUIDs and GUIDs is widespread. Many computing platforms
provide support for generating them, and for parsing their textual
representation.

RFC 4122 defines a Uniform Resource Name (URN) namespace for UUIDs.
A UUID presented as a URN appears as follows:

   urn:uuid:123e4567-e89b-12d3-a456-426655440000

– Wikipedia

PROCEDURES

generate_uuid(version)   generate 36-character UUID string

provide for routines extracted from other modules (M_time and M_random)



Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: IEEE32 = selected_real_kind(6, 37)
integer, public, parameter :: IEEE64 = selected_real_kind(15, 307)
integer(kind=INT32), public, parameter :: M = 397_INT32
integer(kind=INT32), public, parameter :: N = 624_INT32
integer, public, parameter :: realtime = kind(0.0d0)

Derived Types

type, public ::  mtprng_state

Components

Type Visibility Attributes Name Initial
integer(kind=INT64), public, dimension(0:N-1) :: mt
integer(kind=INT32), public :: mti = -1

Functions

public function generate_uuid(version) result(uuid)

Sample usage:

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: version

Return Value character(len=36)