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

Write the input string in the format of a custom notification, warning, or other types of messages to the output.
More...

Detailed Description

Write the input string in the format of a custom notification, warning, or other types of messages to the output.

The procedures under this generic interface call getStrWrapped with the input string to obtain a wrapped text within the specified width and maxwidth where the input prefix is prepended to the beginning of each wrapped line and then printed on the display.

Parameters
[in]msg: The input scalar character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) representing the text to be wrapped and displayed.
[in]prefix: See the corresponding definition in the documentation of getStrWrapped.
(optional, default = "")
[in]indent: See the corresponding definition in the documentation of getStrWrapped.
(optional. The default is set by getStrWrapped.)
[in]break: See the corresponding definition in the documentation of getStrWrapped.
(optional. The default is set by getStrWrapped.)
[in]newline: See the corresponding definition in the documentation of getStrWrapped.
(optional. The default is set by getStrWrapped.)
[in]width: See the corresponding definition in the documentation of getStrWrapped.
(optional. The default is set by getStrWrapped.)
[in]maxwidth: See the corresponding definition in the documentation of getStrWrapped.
(optional. The default is set by getStrWrapped.)
[in]tmsize: The input scalar of integer of default kind IK representing the number of empty lines preceding the text in the display.
(optional, default = 1_IK)
[in]bmsize: The input scalar of integer of default kind IK representing the number of empty lines succeeding the text in the display.
(optional, default = 0_IK)
[in]unit: The input scalar integer of default kind IK containing the output file unit.
(optional, default = output_unit taken from the intrinsic module iso_fortran_env.)


Possible calling interfaces

use pm_err, only: setMarked
call setMarked(msg, prefix = prefix, indent = indent, break = break, newline = newline, width = width, maxwidth = maxwidth, tmsize = tmsize, bmsize = bmsize, unit = unit)
Write the input string in the format of a custom notification, warning, or other types of messages to...
Definition: pm_err.F90:1999
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
Remarks
The procedures under discussion are impure.
See also
getStr
setMarked
setNoted
setWarned
setAborted
setAsserted
getLine


Example usage

1program example
2
3 use pm_kind, only: IK, LK
4 use pm_kind, only: SK ! All kinds are supported.
5 use pm_err, only: setMarked
6 use pm_io, only: display_type
7
8 implicit none
9
10 character(:, SK), allocatable :: str, strWrapped
11
12 type(display_type) :: disp
13
14 disp = display_type(file = "main.out.F90")
15
16 str = "ParaMonte is a serial/parallel library of Monte Carlo routines for \n&
17 & + optimization, \n&
18 & + sampling, and \n&
19 & + integration \n&
20 &of mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in \n&
21 & + data science, \n&
22 & + Machine Learning, and \n&
23 & + scientific inference, \n&
24 &with the design goal of unifying the \n&
25 & + automation (of Monte Carlo simulations), \n&
26 & + user-friendliness (of the library), \n&
27 & + accessibility (from multiple programming environments), \n&
28 & + high-performance (at runtime), and \n&
29 & + scalability (across many parallel processors)."
30
31 call disp%skip()
32 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
33 call disp%show("! Notify the user about an important message.")
34 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
35 call disp%skip()
36
37 call disp%show("str")
38 call disp%show( str, deliml = SK_"""" )
39 call disp%show("call setMarked(str, newline = SK_'\n', unit = disp%unit)")
40 call setMarked(str, newline = SK_'\n', unit = disp%unit)
41 call disp%skip()
42 call disp%show("call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', unit = disp%unit)")
43 call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', unit = disp%unit)
44 call disp%skip()
45 call disp%show("call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', width = 72_IK, unit = disp%unit)")
46 call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', width = 72_IK, unit = disp%unit)
47 call disp%skip()
48
49end 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
6str
7"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)."
8call setMarked(str, newline = SK_'\n', unit = disp%unit)
9
10 - REMARK: ParaMonte is a serial/parallel library of Monte Carlo routines for
11 - REMARK: + optimization,
12 - REMARK: + sampling, and
13 - REMARK: + integration
14 - REMARK: of mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in
15 - REMARK: + data science,
16 - REMARK: + Machine Learning, and
17 - REMARK: + scientific inference,
18 - REMARK: with the design goal of unifying the
19 - REMARK: + automation(of Monte Carlo simulations),
20 - REMARK: + user-friendliness(of the library),
21 - REMARK: + accessibility(from multiple programming environments),
22 - REMARK: + high-performance(at runtime), and
23 - REMARK: + scalability(across many parallel processors).
24
25call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', unit = disp%unit)
26
27 ParaMonte: ParaMonte is a serial/parallel library of Monte Carlo routines for
28 ParaMonte: + optimization,
29 ParaMonte: + sampling, and
30 ParaMonte: + integration
31 ParaMonte: of mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in
32 ParaMonte: + data science,
33 ParaMonte: + Machine Learning, and
34 ParaMonte: + scientific inference,
35 ParaMonte: with the design goal of unifying the
36 ParaMonte: + automation(of Monte Carlo simulations),
37 ParaMonte: + user-friendliness(of the library),
38 ParaMonte: + accessibility(from multiple programming environments),
39 ParaMonte: + high-performance(at runtime), and
40 ParaMonte: + scalability(across many parallel processors).
41
42call setMarked(str, prefix = SK_' ParaMonte: ', newline = SK_'\n', width = 72_IK, unit = disp%unit)
43
44 ParaMonte: ParaMonte is a serial/parallel library of Monte Carlo routines for
45 ParaMonte: + optimization,
46 ParaMonte: + sampling, and
47 ParaMonte: + integration
48 ParaMonte: of mathematical objective functions of arbitrary-dimensions in particular,
49 ParaMonte: the posterior distributions of Bayesian models in
50 ParaMonte: + data science,
51 ParaMonte: + Machine Learning, and
52 ParaMonte: + scientific inference,
53 ParaMonte: with the design goal of unifying the
54 ParaMonte: + automation(of Monte Carlo simulations),
55 ParaMonte: + user-friendliness(of the library),
56 ParaMonte: + accessibility(from multiple programming environments),
57 ParaMonte: + high-performance(at runtime), and
58 ParaMonte: + scalability(across many parallel processors).
59
60

test_pm_err


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, 9:49 PM Friday, March 1, 2013, Institute for Fusion Studies, The University of Texas at Austin

Definition at line 1999 of file pm_err.F90.


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