Octopus
io_oct_m Module Reference

Functions/Subroutines

subroutine, public io_init (defaults)
 If the argument defaults is present and set to true, then the routine will not try to read anything from the inp file, but set everything to the default values. More...
 
subroutine, public io_end ()
 
character(len=max_path_len) function, public io_workdir ()
 construct working directory More...
 
character(len=max_path_len) function, public io_workpath (path, namespace)
 construct path name from given name and namespace More...
 
subroutine, public io_mkdir (fname, namespace, parents)
 
subroutine, public io_rm (fname, namespace)
 
integer function, public io_open (file, namespace, action, status, form, position, die, recl, grp)
 
subroutine, public io_close (iunit, grp)
 
subroutine, public io_dump_file (ounit, filename)
 
character(len=8) function, public io_get_extension (path)
 Given a path, it returns the extension (if it exists) of the file (that is, the part of the name that comes after its last point). If the filename does not have an extension, it returns the empty string. More...
 
subroutine, public io_debug_on_the_fly (namespace)
 check if debug mode should be enabled or disabled on the fly More...
 
logical function, public io_file_exists (filename, msg)
 Returns true if a file with name 'filename' exists and issues a reminder. More...
 
logical function, public io_dir_exists (dir, namespace)
 Returns true if a dir with name 'dir' exists. More...
 
subroutine, public iopar_read (grp, iunit, lines, n_lines, ierr)
 
subroutine, public iopar_backspace (grp, iunit)
 
subroutine, public iopar_find_line (grp, iunit, line, ierr)
 
subroutine, public io_skip_header (iunit)
 
integer(int64) pure function, public io_get_open_count ()
 
integer(int64) pure function, public io_get_close_count ()
 
subroutine, public io_incr_open_count ()
 
subroutine, public io_incr_close_count ()
 
subroutine, public io_incr_counters (iio)
 

Variables

integer, parameter, public iunit_out = 8
 
integer, parameter, public iunit_err = 9
 
character(len=max_path_len) work_dir
 name of the output directory More...
 
character(len=max_path_len) current_working_dir
 
integer(int64), save io_open_count
 
integer(int64), save io_close_count
 

Function/Subroutine Documentation

◆ io_init()

subroutine, public io_oct_m::io_init ( logical, intent(in), optional  defaults)

If the argument defaults is present and set to true, then the routine will not try to read anything from the inp file, but set everything to the default values.

Definition at line 141 of file io.F90.

◆ io_end()

subroutine, public io_oct_m::io_end

Definition at line 247 of file io.F90.

◆ io_workdir()

character(len=max_path_len) function, public io_oct_m::io_workdir

construct working directory

If the given path is absolute, it is not changed. If it is relative, the result is 'current_working_dir/path'

Definition at line 262 of file io.F90.

◆ io_workpath()

character(len=max_path_len) function, public io_oct_m::io_workpath ( character(len=*), intent(in)  path,
type(namespace_t), intent(in), optional  namespace 
)

construct path name from given name and namespace

If the given path is absolute, it is not changed. If it is relative,the result is 'work_dir/namespace/path'

Definition at line 294 of file io.F90.

◆ io_mkdir()

subroutine, public io_oct_m::io_mkdir ( character(len=*), intent(in)  fname,
type(namespace_t), intent(in), optional  namespace,
logical, intent(in), optional  parents 
)

Definition at line 337 of file io.F90.

◆ io_rm()

subroutine, public io_oct_m::io_rm ( character(len=*), intent(in)  fname,
type(namespace_t), intent(in), optional  namespace 
)

Definition at line 368 of file io.F90.

◆ io_open()

integer function, public io_oct_m::io_open ( character(len=*), intent(in)  file,
type(namespace_t), intent(in), optional  namespace,
character(len=*), intent(in)  action,
character(len=*), intent(in), optional  status,
character(len=*), intent(in), optional  form,
character(len=*), intent(in), optional  position,
logical, intent(in), optional  die,
integer, intent(in), optional  recl,
type(mpi_grp_t), intent(in), optional  grp 
)

Definition at line 378 of file io.F90.

◆ io_close()

subroutine, public io_oct_m::io_close ( integer, intent(inout)  iunit,
type(mpi_grp_t), intent(in), optional  grp 
)

Definition at line 443 of file io.F90.

◆ io_dump_file()

subroutine, public io_oct_m::io_dump_file ( integer, intent(in)  ounit,
character(len=*), intent(in)  filename 
)

Definition at line 467 of file io.F90.

◆ io_get_extension()

character(len=8) function, public io_oct_m::io_get_extension ( character(len = *), intent(in)  path)

Given a path, it returns the extension (if it exists) of the file (that is, the part of the name that comes after its last point). If the filename does not have an extension, it returns the empty string.

Definition at line 494 of file io.F90.

◆ io_debug_on_the_fly()

subroutine, public io_oct_m::io_debug_on_the_fly ( type(namespace_t), intent(in)  namespace)

check if debug mode should be enabled or disabled on the fly

Definition at line 511 of file io.F90.

◆ io_file_exists()

logical function, public io_oct_m::io_file_exists ( character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  msg 
)

Returns true if a file with name 'filename' exists and issues a reminder.

Definition at line 541 of file io.F90.

◆ io_dir_exists()

logical function, public io_oct_m::io_dir_exists ( character(len=*), intent(in)  dir,
type(namespace_t), intent(in), optional  namespace 
)

Returns true if a dir with name 'dir' exists.

Definition at line 555 of file io.F90.

◆ iopar_read()

subroutine, public io_oct_m::iopar_read ( type(mpi_grp_t), intent(in)  grp,
integer, intent(in)  iunit,
character(len=*), dimension(:), intent(out)  lines,
integer, intent(in)  n_lines,
integer, intent(out)  ierr 
)

Definition at line 564 of file io.F90.

◆ iopar_backspace()

subroutine, public io_oct_m::iopar_backspace ( type(mpi_grp_t), intent(in)  grp,
integer, intent(in)  iunit 
)

Definition at line 588 of file io.F90.

◆ iopar_find_line()

subroutine, public io_oct_m::iopar_find_line ( type(mpi_grp_t), intent(in)  grp,
integer, intent(in)  iunit,
character(len=*), intent(in)  line,
integer, intent(out)  ierr 
)

Definition at line 600 of file io.F90.

◆ io_skip_header()

subroutine, public io_oct_m::io_skip_header ( integer, intent(in)  iunit)

Definition at line 622 of file io.F90.

◆ io_get_open_count()

integer(int64) pure function, public io_oct_m::io_get_open_count

Definition at line 652 of file io.F90.

◆ io_get_close_count()

integer(int64) pure function, public io_oct_m::io_get_close_count

Definition at line 659 of file io.F90.

◆ io_incr_open_count()

subroutine, public io_oct_m::io_incr_open_count

Definition at line 666 of file io.F90.

◆ io_incr_close_count()

subroutine, public io_oct_m::io_incr_close_count

Definition at line 673 of file io.F90.

◆ io_incr_counters()

subroutine, public io_oct_m::io_incr_counters ( integer, intent(in)  iio)

Definition at line 680 of file io.F90.

Variable Documentation

◆ iunit_out

integer, parameter, public io_oct_m::iunit_out = 8

Definition at line 128 of file io.F90.

◆ iunit_err

integer, parameter, public io_oct_m::iunit_err = 9

Definition at line 129 of file io.F90.

◆ work_dir

character(len=max_path_len) io_oct_m::work_dir
private

name of the output directory

Definition at line 130 of file io.F90.

◆ current_working_dir

character(len=max_path_len) io_oct_m::current_working_dir
private

Definition at line 131 of file io.F90.

◆ io_open_count

integer(int64), save io_oct_m::io_open_count
private

Definition at line 132 of file io.F90.

◆ io_close_count

integer(int64), save io_oct_m::io_close_count
private

Definition at line 133 of file io.F90.