ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_err::mark_type Type Reference

This is the derived type for constructing objects that contain the specifications of the generic interface setMarked along with a dynamic method show that acts as a convenience wrapper around the generic interface setMarked.
More...

Inheritance diagram for pm_err::mark_type:
Collaboration diagram for pm_err::mark_type:

Public Member Functions

 excluded
 

Additional Inherited Members

- Public Attributes inherited from pm_err::message_type
character(:, SK), allocatable, public prefix
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
character(:, SK), allocatable, public indent
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
character(:, SK), allocatable, public break
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
character(:, SK), allocatable, public newline
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
integer(IK), allocatable, public width
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
integer(IK), allocatable, public maxwidth
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
integer(IK), allocatable, public tmsize
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
integer(IK), allocatable, public bmsize
 See the corresponding definition in the documentation of getStrWrapped.
More...
 
integer(IK), allocatable, public unit
 See the corresponding definition in the documentation of message_type.
More...
 
logical(LK), public sticky = .false._LK
 See the corresponding argument in the documentation of message_type.
More...
 

Detailed Description

This is the derived type for constructing objects that contain the specifications of the generic interface setMarked along with a dynamic method show that acts as a convenience wrapper around the generic interface setMarked.

See the documentation of the parent type message_type for more details and inherited derived type components.

Returns
mark : An object of type mark_type containing the attributes and wrapper method for outputting a remark.


Possible calling interfaces

use pm_err, only: mark_type
type(mark_type) :: spec
spec = mark_type( prefix = prefix &
, indent = indent &
, break = break &
, newline = newline &
, width = width &
, maxwidth = maxwidth &
, tmsize = tmsize &
, bmsize = bmsize &
, unit = unit &
, sticky = sticky &
)
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
This is the derived type for constructing objects that contain the specifications of the generic inte...
Definition: pm_err.F90:973
Developer Remark:
The allocation status of the components is used to signify the optional argument presence within the methods.
See also
mark_type
note_type
warn_type
stop_type
display_type
message_type
getStrWrapped
getCentered
setCentered


Example usage

1program example
2
3 use pm_kind, only: IK, LK
4 use pm_io, only: display_type
5 use pm_err, only: mark_type
6 use pm_kind, only: SK ! All kinds are supported.
7 use iso_fortran_env, only: output_unit
8
9 implicit none
10
11 character(:, SK), allocatable :: str, strWrapped
12
13 type(display_type) :: disp
14
15 disp = display_type(file = SK_"main.out.F90")
16
17 str = "ParaMonte is a serial/parallel library of Monte Carlo routines for \n&
18 & + optimization, \n&
19 & + sampling, and \n&
20 & + integration \n&
21 &of mathematical objective functions of arbitrary-dimensions, &
22 &in particular, the posterior distributions of Bayesian models in \n&
23 & + data science, \n&
24 & + Machine Learning, and \n&
25 & + scientific inference, \n&
26 &with the design goal of unifying the \n&
27 & + automation (of Monte Carlo simulations), \n&
28 & + user-friendliness (of the library), \n&
29 & + accessibility (from multiple programming environments), \n&
30 & + high-performance (at runtime), and \n&
31 & + scalability (across many parallel processors)."
32
33 call disp%skip()
34 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
35 call disp%show("! Notify the user about an important message.")
36 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
37 call disp%skip()
38
39 block
40 type(mark_type) :: mark
41 call disp%show("mark = mark_type(unit = disp%unit, newline = SK_'\n', prefix = SK_' ParaMonte')")
42 mark = mark_type(unit = disp%unit, newline = SK_'\n', prefix = SK_' ParaMonte')
43 call disp%show("str")
44 call disp%show( str, deliml = SK_"""" )
45 call disp%skip()
46 call disp%show("call mark%show(str)")
47 call mark%show(str)
48 call disp%skip()
49 call disp%show("call mark%show(str, width = 72_IK, sticky = .true._LK)")
50 call mark%show(str, width = 72_IK, sticky = .true._LK)
51 call disp%skip()
52 call disp%show("call mark%show(str) ! same width as before.")
53 call mark%show(str) ! same width as before.
54 call disp%skip()
55 end block
56
57end program example
Generate and return an object of type stop_type with the user-specified input attributes.
Definition: pm_err.F90:1618
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Notify the user about an important message.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6mark = mark_type(unit = disp%unit, newline = SK_'\n', prefix = SK_' ParaMonte')
7str
8"ParaMonte is a serial/parallel library of Monte Carlo routines for \n + optimization, \n + sampling, and \n + integration \nof mathematical objective functions of arbitrary-dimensions, in particular, the posterior distributions of Bayesian models in \n + data science, \n + Machine Learning, and \n + scientific inference, \nwith the design goal of unifying the \n + automation (of Monte Carlo simulations), \n + user-friendliness (of the library), \n + accessibility (from multiple programming environments), \n + high-performance (at runtime), and \n + scalability (across many parallel processors)."
9
10call mark%show(str)
11
12 ParaMonteParaMonte is a serial/parallel library of Monte Carlo routines for
13 ParaMonte + optimization,
14 ParaMonte + sampling, and
15 ParaMonte + integration
16 ParaMonteof mathematical objective functions of arbitrary-dimensions, in particular, the posterior distributions of Bayesian models in
17 ParaMonte + data science,
18 ParaMonte + Machine Learning, and
19 ParaMonte + scientific inference,
20 ParaMontewith the design goal of unifying the
21 ParaMonte + automation(of Monte Carlo simulations),
22 ParaMonte + user-friendliness(of the library),
23 ParaMonte + accessibility(from multiple programming environments),
24 ParaMonte + high-performance(at runtime), and
25 ParaMonte + scalability(across many parallel processors).
26
27call mark%show(str, width = 72_IK, sticky = .true._LK)
28
29 ParaMonteParaMonte is a serial/parallel library of Monte Carlo routines for
30 ParaMonte + optimization,
31 ParaMonte + sampling, and
32 ParaMonte + integration
33 ParaMonteof mathematical objective functions of arbitrary-dimensions, in particular,
34 ParaMontethe posterior distributions of Bayesian models in
35 ParaMonte + data science,
36 ParaMonte + Machine Learning, and
37 ParaMonte + scientific inference,
38 ParaMontewith the design goal of unifying the
39 ParaMonte + automation(of Monte Carlo simulations),
40 ParaMonte + user-friendliness(of the library),
41 ParaMonte + accessibility(from multiple programming environments),
42 ParaMonte + high-performance(at runtime), and
43 ParaMonte + scalability(across many parallel processors).
44
45call mark%show(str) ! same width as before.
46
47 ParaMonteParaMonte is a serial/parallel library of Monte Carlo routines for
48 ParaMonte + optimization,
49 ParaMonte + sampling, and
50 ParaMonte + integration
51 ParaMonteof mathematical objective functions of arbitrary-dimensions, in particular,
52 ParaMontethe posterior distributions of Bayesian models in
53 ParaMonte + data science,
54 ParaMonte + Machine Learning, and
55 ParaMonte + scientific inference,
56 ParaMontewith the design goal of unifying the
57 ParaMonte + automation(of Monte Carlo simulations),
58 ParaMonte + user-friendliness(of the library),
59 ParaMonte + accessibility(from multiple programming environments),
60 ParaMonte + high-performance(at runtime), and
61 ParaMonte + scalability(across many parallel processors).
62
63
Test:
test_pm_err
Bug:

Status: Unresolved
Source: GNU Fortran Compiler gfortran version 11-13
Description: GNU Fortran Compiler gfortran cannot properly construct the allocatable scalar non-character components of objects of type warn_type using the default constructor.
For example, when unit is set via the default constructor, the program behaves as if the unit component of the object is allocated but unset, yielding a segmentation fault error.

Remedy (as of ParaMonte Library version 2.0.0): For now, the custom constructor bypasses GNU Fortran Compiler gfortran bug.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Tuesday March 7, 2017, 3:50 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 973 of file pm_err.F90.

Member Function/Subroutine Documentation

◆ excluded()

pm_err::mark_type::excluded

Definition at line 996 of file pm_err.F90.


The documentation for this type was generated from the following file: