ScalES-PPM
Functions/Subroutines | Variables
ppm_f90_io_lun Module Reference

module ppm_f90_io_lun provides an abstraction layer so that unique unit numbers can be retrieved without filling a global table cross-referenced by humans More...

Functions/Subroutines

subroutine, public setup_lun_table
 allocate array of reserved luns, reserves unit from 1 to 10 by default
 
subroutine, public take_down_lun_table
 
subroutine, public add_lun_reservation (lun)
 excludes lun from list of automatically probed luns More...
 
subroutine, public remove_lun_reservation (lun)
 includes lun in list of automatically probed luns (i.e. cancels previous reservation) More...
 
subroutine, public add_lun_reservations (luns, nluns)
 excludes luns from list of automatically probed luns More...
 
subroutine, public remove_lun_reservations (luns, nluns)
 includes luns in list of automatically probed luns More...
 
subroutine, public set_reserved_luns (luns, nluns)
 set list of luns excluded from automatically probed luns More...
 
subroutine, public next_free_unit_in_range (min_lun, max_lun, found, unit)
 returns next available unit in range [min_lun,max_lun] in param unit More...
 
integer function, public next_free_unit ()
 find currently available unit number, the range is determined by default_min_lun and default_max_lun More...
 
integer function reserve_and_get_next_free_unit ()
 find currently available unit number, the range is determined by default_min_lun and default_max_lun and the returned unit is also immediately reserved More...
 
subroutine adjust_reserved_map (lun)
 

Variables

integer, public default_min_lun =1
 
integer, public default_max_lun =100
 
integer, parameter default_min_reserved_lun =1
 
integer, parameter default_max_reserved_lun =10
 
integer min_reserved_lun =default_min_reserved_lun
 
integer max_reserved_lun =default_max_reserved_lun
 
logical, dimension(:), allocatable, private reserved_luns
 
character(len= *), parameter filename = 'ppm_f90_io_lun.f90'
 

Detailed Description

module ppm_f90_io_lun provides an abstraction layer so that unique unit numbers can be retrieved without filling a global table cross-referenced by humans

use one of the next_free_unit* functions to find a number suitable for use as logical unit number (lun) and not yet opened or reserved this is further referred to as available

Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de
Date
2009-04-09

Function/Subroutine Documentation

◆ add_lun_reservation()

subroutine, public ppm_f90_io_lun::add_lun_reservation ( integer, intent(in)  lun)

excludes lun from list of automatically probed luns

Parameters
lunnumber of lun to be marked as unavailable

◆ add_lun_reservations()

subroutine, public ppm_f90_io_lun::add_lun_reservations ( integer, dimension(nluns), intent(in)  luns,
integer, intent(in)  nluns 
)

excludes luns from list of automatically probed luns

Parameters
lunsarray holding numbers of luns to be marked as unavailable
nlunssize of array luns

◆ next_free_unit()

integer function, public ppm_f90_io_lun::next_free_unit

find currently available unit number, the range is determined by default_min_lun and default_max_lun

Returns
next available unit

◆ next_free_unit_in_range()

subroutine, public ppm_f90_io_lun::next_free_unit_in_range ( integer, intent(in)  min_lun,
integer, intent(in)  max_lun,
logical, intent(out)  found,
integer, intent(out)  unit 
)

returns next available unit in range [min_lun,max_lun] in param unit

Parameters
min_lundo not search for luns less than this
max_lundo not search for luns greater than this
foundset to .false. if no available unit in given range could be found
unitset to number of available unit iff found is .true.

◆ remove_lun_reservation()

subroutine, public ppm_f90_io_lun::remove_lun_reservation ( integer, intent(in)  lun)

includes lun in list of automatically probed luns (i.e. cancels previous reservation)

Parameters
lunnumber of lun to be marked as available

◆ remove_lun_reservations()

subroutine, public ppm_f90_io_lun::remove_lun_reservations ( integer, dimension(nluns), intent(in)  luns,
integer, intent(in)  nluns 
)

includes luns in list of automatically probed luns

Parameters
lunsarray holding numbers of luns to be marked as available
nlunssize of array luns

◆ reserve_and_get_next_free_unit()

integer function ppm_f90_io_lun::reserve_and_get_next_free_unit
private

find currently available unit number, the range is determined by default_min_lun and default_max_lun and the returned unit is also immediately reserved

Returns
next available unit

◆ set_reserved_luns()

subroutine, public ppm_f90_io_lun::set_reserved_luns ( integer, dimension(nluns), intent(in)  luns,
integer, intent(in)  nluns 
)

set list of luns excluded from automatically probed luns

Parameters
lunsarray holding numbers of luns to be marked as unavailable
nlunssize of array luns

Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.