Low-level system routines
Module system_module
Defined at System.fpp lines 137-2973
The system module contains low-level routines for I/O, timing, random number generation etc. The Inoutput type is used to abstract both formatted and unformatted(i.e. binary) I/O.
- class quippy.system_module.InOutput(name=inoutput)[source]
Bases:
FortranDerivedType
Defined at System.fpp lines 158-170
- Attributes:
action
Element action ftype=integer pytype=int
active
Element active ftype=logical pytype=bool
append
Element append ftype=logical pytype=bool
default_real_precision
Element default_real_precision ftype=integer pytype=int
filename
Element filename ftype=character(256) pytype=str
formatted
Element formatted ftype=logical pytype=bool
initialised
Element initialised ftype=logical pytype=bool
mpi_all_inoutput_flag
Element mpi_all_inoutput_flag ftype=logical pytype=bool
mpi_print_id
Element mpi_print_id ftype=logical pytype=bool
postfix
Element postfix ftype=character(256) pytype=str
prefix
Element prefix ftype=character(256) pytype=str
unit
Element unit ftype=integer pytype=int
verbosity_cascade_stack
Element verbosity_cascade_stack ftype=type(stack) pytype=Stack
verbosity_stack
Element verbosity_stack ftype=type(stack) pytype=Stack
Methods
activate
(self)Defined at System.fpp lines 582-584
deactivate
(self)Defined at System.fpp lines 577-579
mpi_all_inoutput
(self[, value])Defined at System.fpp lines 601-608
parse_line
(self, delimiters, fields[, status])Defined at System.fpp lines 878-888
print_inoutput
(self)Defined at System.fpp lines 736-755
print_mpi_id
(self[, value])Defined at System.fpp lines 610-617
read_ascii
(*args, **kwargs)Defined at System.fpp lines 260-261
read_line
(self[, status])Defined at System.fpp lines 801-813
rewind
(self)Defined at System.fpp lines 1636-1638
- activate(self)[source]
Defined at System.fpp lines 582-584
- Parameters:
- thisInoutput
- Activate an Inoutput object temporarily.
- deactivate(self)[source]
Defined at System.fpp lines 577-579
- Parameters:
- thisInoutput
- Deactivate an Inoutput object temporarily.
- mpi_all_inoutput(self[, value])[source]
Defined at System.fpp lines 601-608
- Parameters:
- thisInoutput
- valuebool
- parse_line(self, delimiters, fields[, status])[source]
Defined at System.fpp lines 878-888
- Parameters:
- thisInoutput
- delimitersstr
- fieldsstr array
- statusint
- Returns:
- num_fieldsint
- Call parse_string on the next line from a file
- print_inoutput(self)[source]
Defined at System.fpp lines 736-755
- Parameters:
- thisInoutput
- Overloaded interface for printing. With the
- ‘this’ parameter omitted output goes to the default mainlog(‘stdout’). The
- ‘verbosity’ parameter controls whether the object is actually printed;
- if the verbosity is greater than that currently at the top of the
- verbosity stack then output is suppressed. Possible verbosity levels
- range from ‘ERROR’ through ‘NORMAL’, ‘VERBOSE’, ‘NERD’ and ‘ANALYSIS’.
- Other user-defined types define the Print interface in the same way.
- print_mpi_id(self[, value])[source]
Defined at System.fpp lines 610-617
- Parameters:
- thisInoutput
- valuebool
- read_ascii(*args, **kwargs)[source]
Defined at System.fpp lines 260-261
- Overloaded interface containing the following procedures:
_reada_real_dim1 _reada_int_dim1
- read_line(self[, status])[source]
Defined at System.fpp lines 801-813
- Parameters:
- thisInoutput
- statusint
- Returns:
- inoutput_read_linestr
- Read a line of text from a file(up to a line break, or 1024 characters).
- This can then be parsed by the calling routine(using ‘parse_line’ for example)
- Optionally, a status is returned which is:
- egin{itemize}
- item $<0$ if the end of the file is reached
- item $=0$ if no problems were encountered
- item $>0$ if there was a read error
- end{itemize}
- The actual number returned is implementation specific
- rewind(self)[source]
Defined at System.fpp lines 1636-1638
- Parameters:
- thisInoutput
- Rewind to the start of this file. Works for both formatted and unformatted files.
- property action
Element action ftype=integer pytype=int
Defined at System.fpp line 166
- property active
Element active ftype=logical pytype=bool
Defined at System.fpp line 165
Does it print?
- property append
Element append ftype=logical pytype=bool
Defined at System.fpp line 164
- property default_real_precision
Element default_real_precision ftype=integer pytype=int
Defined at System.fpp line 162
- property filename
Element filename ftype=character(256) pytype=str
Defined at System.fpp line 160
- property formatted
Element formatted ftype=logical pytype=bool
Defined at System.fpp line 163
- property initialised
Element initialised ftype=logical pytype=bool
Defined at System.fpp line 170
- property mpi_all_inoutput_flag
Element mpi_all_inoutput_flag ftype=logical pytype=bool
Defined at System.fpp line 167
- property mpi_print_id
Element mpi_print_id ftype=logical pytype=bool
Defined at System.fpp line 168
- property postfix
Element postfix ftype=character(256) pytype=str
Defined at System.fpp line 161
- property prefix
Element prefix ftype=character(256) pytype=str
Defined at System.fpp line 161
- property unit
Element unit ftype=integer pytype=int
Defined at System.fpp line 159
- property verbosity_cascade_stack
Element verbosity_cascade_stack ftype=type(stack) pytype=Stack
Defined at System.fpp line 169
- property verbosity_stack
Element verbosity_stack ftype=type(stack) pytype=Stack
Defined at System.fpp line 169
- class quippy.system_module.Stack(name=stack)[source]
Bases:
FortranDerivedType
Defined at System.fpp lines 154-156
Methods
pop
(self)Defined at System.fpp lines 2335-2341
print
(self[, verbosity, out])Defined at System.fpp lines 2352-2360
push
(self, val)Defined at System.fpp lines 2317-2333
value
(self)Defined at System.fpp lines 2343-2350
- print(self[, verbosity, out])[source]
Defined at System.fpp lines 2352-2360
- Parameters:
- thisStack
- verbosityint
- outInoutput
- Overloaded interface for printing. With the
- ‘this’ parameter omitted output goes to the default mainlog(‘stdout’). The
- ‘verbosity’ parameter controls whether the object is actually printed;
- if the verbosity is greater than that currently at the top of the
- verbosity stack then output is suppressed. Possible verbosity levels
- range from ‘ERROR’ through ‘NORMAL’, ‘VERBOSE’, ‘NERD’ and ‘ANALYSIS’.
- Other user-defined types define the Print interface in the same way.
- value(self)[source]
Defined at System.fpp lines 2343-2350
- Parameters:
- thisStack
- Returns:
- stack_valueint
- property pos
Element pos ftype=integer pytype=int
Defined at System.fpp line 155
- property val
Element val ftype=integer pytype=int
Defined at System.fpp line 156
- class quippy.system_module.allocatable_array_pointers(name=allocatable_array_pointers)[source]
Bases:
FortranDerivedType
Defined at System.fpp lines 172-176
- Attributes:
- property c_a
Element c_a ftype=complex(dp) pytype=complex
Defined at System.fpp line 175
- property i_a
Element i_a ftype=integer pytype=int
Defined at System.fpp line 173
- property l_a
Element l_a ftype=logical pytype=bool
Defined at System.fpp line 176
- property r_a
Element r_a ftype=real(dp) pytype=float
Defined at System.fpp line 174
- quippy.system_module.a2s(a)[source]
Defined at System.fpp lines 2640-2646
- Parameters:
- astr array
- Returns:
- sstr
- Character array to string
- quippy.system_module.abort_on_mpi_error(error_code, routine_name)[source]
Defined at System.fpp lines 2558-2563
- Parameters:
- error_codeint
- routine_namestr
- Abort with a useful message if an MPI routine returned an error status
- quippy.system_module.alloc_trace(str, amt)[source]
Defined at System.fpp lines 2577-2583
- Parameters:
- strstr
- amtint
- quippy.system_module.cmd_arg_count()[source]
Defined at System.fpp lines 1980-1982
- Returns:
- cmd_arg_countint
- quippy.system_module.current_times([cpu_t, wall_t, mpi_t])[source]
Defined at System.fpp lines 2219-2227
- Parameters:
- cpu_tfloat
- wall_tfloat
- mpi_tfloat
- quippy.system_module.current_verbosity()[source]
Defined at System.fpp lines 2420-2422
- Returns:
- current_verbosityint
- return the current value of verbosity
- quippy.system_module.dealloc_trace(str, amt)[source]
Defined at System.fpp lines 2585-2591
- Parameters:
- strstr
- amtint
- quippy.system_module.func()
Element command_arg ftype=character(2550) pytype=str
Defined at System.fpp line 213
The first ‘MAX_READABLE_ARGS’ command arguments
- quippy.system_module.get_array_command_arg()[source]
Element command_arg ftype=character(2550) pytype=str
Defined at System.fpp line 213
The first ‘MAX_READABLE_ARGS’ command arguments
- quippy.system_module.get_cmd_arg(i[, status])[source]
Defined at System.fpp lines 1984-1988
- Parameters:
- iint
- statusint
- Returns:
- argstr
- quippy.system_module.get_complex_size()[source]
Element complex_size ftype=integer pytype=int
Defined at System.fpp line 149
- quippy.system_module.get_env_var(name[, status])[source]
Defined at System.fpp lines 1990-1995
- Parameters:
- namestr
- statusint
- Returns:
- argstr
- quippy.system_module.get_errorlog()[source]
Element errorlog ftype=type(inoutput) pytype=Inoutput
Defined at System.fpp line 185
error output, connected to ‘stderr’ by default
- quippy.system_module.get_exec_name()[source]
Element exec_name ftype=character(255) pytype=str
Defined at System.fpp line 212
The name of the executable
- quippy.system_module.get_inout()[source]
Element inout ftype=integer pytype=int
Defined at System.fpp line 201
- quippy.system_module.get_input()[source]
Element input ftype=integer pytype=int
Defined at System.fpp line 199
- quippy.system_module.get_integer_size()[source]
Element integer_size ftype=integer pytype=int
Defined at System.fpp line 147
- quippy.system_module.get_line()[source]
Element line ftype=character(system_string_length_long) pytype=str
Defined at System.fpp line 182
- quippy.system_module.get_mainlog()[source]
Element mainlog ftype=type(inoutput) pytype=Inoutput
Defined at System.fpp line 184
main output, connected to ‘stdout’ by default
- quippy.system_module.get_max_readable_args()[source]
Element max_readable_args ftype=integer pytype=int
Defined at System.fpp line 211
The maximum number of arguments that will be read
- quippy.system_module.get_mpi_size_rank(comm)[source]
Defined at System.fpp lines 1894-1900
- Parameters:
- commint
MPI communicator
- Returns:
- nprocint
Total number of processes
- rank_bnint
Rank of this process
- Return the mpi size and rank for the communicator ‘comm’.
- this routine aborts of _MPI is not defined
- quippy.system_module.get_mpilog()[source]
Element mpilog ftype=type(inoutput) pytype=Inoutput
Defined at System.fpp line 186
MPI output, written to by each mpi process
- quippy.system_module.get_num_command_args()[source]
Element num_command_args ftype=integer pytype=int
Defined at System.fpp line 210
The number of arguments on the command line
- quippy.system_module.get_numerical_zero()[source]
Element numerical_zero ftype=real(dp) pytype=float
Defined at System.fpp line 189
- quippy.system_module.get_output()[source]
Element output ftype=integer pytype=int
Defined at System.fpp line 200
- quippy.system_module.get_print_always()[source]
Element print_always ftype=integer pytype=int
Defined at System.fpp line 193
- quippy.system_module.get_print_analysis()[source]
Element print_analysis ftype=integer pytype=int
Defined at System.fpp line 198
- quippy.system_module.get_print_nerd()[source]
Element print_nerd ftype=integer pytype=int
Defined at System.fpp line 197
- quippy.system_module.get_print_normal()[source]
Element print_normal ftype=integer pytype=int
Defined at System.fpp line 195
- quippy.system_module.get_print_silent()[source]
Element print_silent ftype=integer pytype=int
Defined at System.fpp line 194
- quippy.system_module.get_print_verbose()[source]
Element print_verbose ftype=integer pytype=int
Defined at System.fpp line 196
- quippy.system_module.get_quip_new_line()[source]
Element quip_new_line ftype=character pytype=str
Defined at System.fpp line 146
- quippy.system_module.get_quippy_running()[source]
Defined at System.fpp lines 2547-2549
- Returns:
- get_quippy_runningbool
- quippy.system_module.get_ran_a()[source]
Element ran_a ftype=integer pytype=int
Defined at System.fpp line 203
- quippy.system_module.get_ran_m()[source]
Element ran_m ftype=integer pytype=int
Defined at System.fpp line 204
- quippy.system_module.get_ran_max()[source]
Element ran_max ftype=integer pytype=int
Defined at System.fpp line 191
- quippy.system_module.get_ran_q()[source]
Element ran_q ftype=integer pytype=int
Defined at System.fpp line 205
- quippy.system_module.get_ran_r()[source]
Element ran_r ftype=integer pytype=int
Defined at System.fpp line 206
- quippy.system_module.get_real_size()[source]
Element real_size ftype=integer pytype=int
Defined at System.fpp line 148
- quippy.system_module.get_system_always_flush()[source]
Element system_always_flush ftype=logical pytype=bool
Defined at System.fpp line 143
- quippy.system_module.get_system_use_fortran_random()[source]
Element system_use_fortran_random ftype=logical pytype=bool
Defined at System.fpp line 144
- quippy.system_module.get_timer_stack()[source]
Element timer_stack ftype=integer pytype=int
Defined at System.fpp line 208
- quippy.system_module.get_trace_memory()[source]
Element trace_memory ftype=logical pytype=bool
Defined at System.fpp line 150
- quippy.system_module.get_traced_memory()[source]
Element traced_memory ftype=integer pytype=int
Defined at System.fpp line 151
- quippy.system_module.increase_stack(stack_size)[source]
Defined at System.fpp lines 2551-2555
- Parameters:
- stack_sizeint
- Returns:
- increase_stackint
- quippy.system_module.increase_to_multiple(a, m)[source]
Defined at System.fpp lines 2923-2927
- Parameters:
- aint
- mint
- Returns:
- resint
- quippy.system_module.int_format_length(*args, **kwargs)[source]
Defined at System.fpp lines 365-366
- Overloaded interface containing the following procedures:
_int_format_length_isp _int_format_length_idp
- quippy.system_module.is_file_readable(filename)[source]
Defined at System.fpp lines 2287-2299
- Parameters:
- filenamestr
- Returns:
- is_file_readablebool
- Test if the file ‘filename’ can be accessed.
- quippy.system_module.is_open(unit)[source]
Defined at System.fpp lines 561-564
- Parameters:
- unitint
- Returns:
- is_openbool
- OMIT
- quippy.system_module.linebreak_string(str, line_len)[source]
Defined at System.fpp lines 2732-2770
- Parameters:
- strstr
- line_lenint
- Returns:
- lb_strstr
- quippy.system_module.link_run_directory(sourcename[, basename, run_dir_i, error])[source]
Defined at System.fpp lines 2696-2720
- Parameters:
- sourcenamestr
- basenamestr
- run_dir_iint
- errorint
- Returns:
- dirstr
- quippy.system_module.lower_case(word)[source]
Defined at System.fpp lines 2828-2840
- Parameters:
- wordstr
- Returns:
- lower_casestr
- Convert a word to lower case
- quippy.system_module.make_run_directory([basename, force_run_dir_i, run_dir_i, error])[source]
Defined at System.fpp lines 2659-2694
- Parameters:
- basenamestr
- force_run_dir_iint
- run_dir_iint
- errorint
- Returns:
- dirstr
- quippy.system_module.mem_info(*args, **kwargs)[source]
Defined at System.fpp lines 315-316
- Overloaded interface containing the following procedures:
_mem_info_i _mem_info_r
- quippy.system_module.mpi_id()[source]
Defined at System.fpp lines 2613-2615
- Returns:
- idint
- Return this processes’ MPI ID
- quippy.system_module.mpi_n_procs()[source]
Defined at System.fpp lines 2618-2620
- Returns:
- nint
- Return the total number of MPI processes.
- quippy.system_module.num_fields_in_string_simple(this, separators)[source]
Defined at System.fpp lines 924-933
- Parameters:
- thisstr
- separatorsstr
- Returns:
- num_fields_in_string_simpleint
- quippy.system_module.optional_default(*args, **kwargs)[source]
Defined at System.fpp lines 352-355
- Overloaded interface containing the following procedures:
_optional_default_l _optional_default_i _optional_default_r _optional_default_c _optional_default_ca _optional_default_z _optional_default_ia _optional_default_ra
takes as arguments a default value and an optional argument, and returns the optional argument value if it’s present, otherwise the default value
- quippy.system_module.pad(s, l)[source]
Defined at System.fpp lines 2649-2657
- Parameters:
- sstr
- lint
- Returns:
- astr array
- String to padded character array of length l
- quippy.system_module.parallel_print(lines, comm[, verbosity, file])[source]
Defined at System.fpp lines 2565-2575
- Parameters:
- linesstr array
- commint
- verbosityint
- fileInoutput
- quippy.system_module.parse_string(this, delimiters, fields[, matching, error])[source]
Defined at System.fpp lines 1097-1188
- Parameters:
- thisstr
- delimitersstr
- fieldsstr array
- matchingbool
- errorint
- Returns:
- num_fieldsint
- outdated - please use split_string
- Parse a string into fields delimited by certain characters. On exit
- the ‘fields’ array will contain one field per entry and ‘num_fields’
- gives the total number of fields. ‘status’ will be given the error status
- (if present) and so can be used to tell if an end-of-file occurred.
- quippy.system_module.print(*args, **kwargs)[source]
Defined at System.fpp lines 252-256
- Overloaded interface containing the following procedures:
_inoutput_print_string _inoutput_print_integer _inoutput_print_real _inoutput_print_logical _inoutput_print_char_array
Overloaded interface for printing. With the ‘this’ parameter omitted output goes to the default mainlog(‘stdout’). The ‘verbosity’ parameter controls whether the object is actually printed; if the verbosity is greater than that currently at the top of the verbosity stack then output is suppressed. Possible verbosity levels range from ‘ERROR’ through ‘NORMAL’, ‘VERBOSE’, ‘NERD’ and ‘ANALYSIS’. Other user-defined types define the Print interface in the same way.
- quippy.system_module.print_message(message_type, message[, verbosity])[source]
Defined at System.fpp lines 2022-2027
- Parameters:
- message_typestr
- messagestr
- verbosityint
- Print a message to log
- quippy.system_module.print_title(title[, verbosity])[source]
Defined at System.fpp lines 767-782
- Parameters:
- titlestr
- verbosityint
- Print a centred title, like this:
- ‘==================================== Title =====================================’
- quippy.system_module.print_warning(message)[source]
Defined at System.fpp lines 2016-2019
- Parameters:
- messagestr
- Backward compatible(replaced with print_message) routine to print a warning message to log
- quippy.system_module.progress(total, current, name)[source]
Defined at System.fpp lines 2857-2873
- Parameters:
- totalint
- currentint
- namestr
- Print a progress bar
- quippy.system_module.progress_timer(total, current, name, elapsed_seconds)[source]
Defined at System.fpp lines 2877-2921
- Parameters:
- totalint
- currentint
- namestr
- elapsed_secondsfloat
- Print a progress bar with an estimate of time to completion
- based on the elapsed time so far
- quippy.system_module.ran()[source]
Defined at System.fpp lines 2158-2172
- Returns:
- dranfloat
- Return a random integer
- quippy.system_module.ran_normal()[source]
Defined at System.fpp lines 2187-2195
- Returns:
- ran_normalfloat
- Return random real from Normal distribution with mean zero and standard deviation one.
- quippy.system_module.ran_uniform()[source]
Defined at System.fpp lines 2175-2184
- Returns:
- ran_uniformfloat
- Return a random real number uniformly distributed in the range [0,1]
- quippy.system_module.reference_false()[source]
Defined at System.fpp lines 2626-2628
- Returns:
- reference_falsebool
- quippy.system_module.reference_true()[source]
Defined at System.fpp lines 2622-2624
- Returns:
- reference_truebool
- quippy.system_module.replace(string_bn, search, substitute)[source]
Defined at System.fpp lines 2842-2854
- Parameters:
- string_bnstr
- searchstr
- substitutestr
- Returns:
- resstr
- quippy.system_module.round(r, digits)[source]
Defined at System.fpp lines 1663-1675
- Parameters:
- rfloat
- digitsint
- Returns:
- roundstr
- Concatenation functions.
- Overloadings for the // operator to make strings from various other types.
- In each case, we need to work out the exact length of the resultant string
- in order to avoid printing excess spaces.
- Return a string which is the real number ‘r’ rounded to ‘digits’ decimal digits
- quippy.system_module.s2a(s)[source]
Defined at System.fpp lines 2631-2637
- Parameters:
- sstr
- Returns:
- astr array
- String to character array
- quippy.system_module.split_string(this, separators, quotes, fields[, matching])[source]
Defined at System.fpp lines 939-1071
- Parameters:
- thisstr
- separatorsstr
- quotesstr
- fieldsstr array
- matchingbool
- Returns:
- num_fieldsint
- split a string at separators, making sure not to break up bits that
- are in quotes(possibly matching opening and closing quotes), and
- also strip one level of quotes off, sort of like a shell would when
- tokenizing
- quippy.system_module.split_string_simple(str, fields, separators[, error])[source]
Defined at System.fpp lines 892-922
- Parameters:
- strstr
string to be split
- fieldsstr array
on return, array of fields
- separatorsstr
string of possible separators
- errorint
- Returns:
- n_fieldsint
on return, number of fields
- split a string into fields separated by possible separators
- no quoting, matching separators, just a simple split
- quippy.system_module.string_to_int(string_bn[, error])[source]
Defined at System.fpp lines 1281-1291
- Parameters:
- string_bnstr
- errorint
- Returns:
- string_to_intint
- Convert an input string into an integer.
- quippy.system_module.string_to_logical(string_bn[, error])[source]
Defined at System.fpp lines 1294-1306
- Parameters:
- string_bnstr
- errorint
- Returns:
- string_to_logicalbool
- Convert an input string into a logical.
- quippy.system_module.string_to_numerical(*args, **kwargs)[source]
Defined at System.fpp lines 360-362
- Overloaded interface containing the following procedures:
_string_to_real_sub _string_to_integer_sub _string_to_logical_sub _string_to_real1d _string_to_integer1d _string_to_logical1d
- quippy.system_module.string_to_real(string_bn[, error])[source]
Defined at System.fpp lines 1309-1319
- Parameters:
- string_bnstr
- errorint
- Returns:
- string_to_realfloat
- Convert an input string into a real.
- quippy.system_module.system_finalise()[source]
Defined at System.fpp lines 1998-2013
Shut down gracefully, finalising system objects.
- quippy.system_module.system_get_random_seed()[source]
Defined at System.fpp lines 2153-2155
- Returns:
- system_get_random_seedint
- Return the current random number seed.
- quippy.system_module.system_initialise([verbosity, seed, mpi_all_inoutput, common_seed, enable_timing, quippy_running, mainlog_file, mainlog_unit])[source]
Defined at System.fpp lines 1910-1967
- Parameters:
- verbosityint
mainlog output verbosity
- seedint
Seed for the random number generator.
- mpi_all_inoutputbool
Print on all MPI nodes(false by default)
- common_seedbool
- enable_timingbool
Enable system_timer() calls
- quippy_runningbool
.true. if running under quippy(Python interface)
- mainlog_filestr
- mainlog_unitint
If ‘common_seed’ is true(default), random seed will be the same for each MPI process.
- Must be called at the start of all programs. Initialises MPI if present,
- set the random number seed sets up the default Inoutput objects
- logger and errorlog to point to stdout and stderr respectively. Calls
- Hello_World to do some of the work and print a friendly welcome. If we’re
- using MPI, by default we set the same random seed for each process.
- This also attempts to read the executable name, the number of command
- arguments, and the arguments themselves.
- quippy.system_module.system_reseed_rng(new_seed)[source]
Defined at System.fpp lines 2147-2150
- Parameters:
- new_seedint
- Reseed the random number generator. Useful when restarting from check files.
- quippy.system_module.system_set_random_seeds(seed)[source]
Defined at System.fpp lines 2043-2062
- Parameters:
- seedint
- quippy.system_module.system_timer(name[, do_always, time_elapsed, do_print])[source]
Defined at System.fpp lines 2241-2284
- Parameters:
- namestr
Unique identifier for this timer
- do_alwaysbool
- time_elapsedfloat
- do_printbool
- Measure elapsed CPU and wall clock time between pairs of calls with
- matching ‘name’ parameter. Calls to ‘system_timer’ must be properly
- nested(i.e. start and stop from different pairs can’t overlap), and
- maximum depth of calls is set by the ‘TIMER_STACK’ parameter.
- > call system_timer(name) start the clock
- > … do something
- > call system_timer(name) stop clock and print elapsed time
- >
- > If optional do_always argument is true, routine will do its thing even
- > if system_do_timing is false.
- quippy.system_module.th(n)[source]
Defined at System.fpp lines 2125-2144
- Parameters:
- nint
- Returns:
- thstr
- Return the correct ordinal ending(st,nd,rd,th) for the given integer
- quippy.system_module.upper_case(word)[source]
Defined at System.fpp lines 2813-2825
- Parameters:
- wordstr
- Returns:
- upper_casestr
- Convert a word to upper case
- quippy.system_module.verbosity_of_str(str)[source]
Defined at System.fpp lines 2382-2399
- Parameters:
- strstr
- Returns:
- valint
- Map from descriptive verbosity names(‘NORMAL’, ‘VERBOSE’ etc.) to numbers
- quippy.system_module.verbosity_pop()[source]
Defined at System.fpp lines 2415-2417
pop the current verbosity value off the stack
- quippy.system_module.verbosity_push(val)[source]
Defined at System.fpp lines 2404-2412
- Parameters:
- valint
- Push a value onto the verbosity stack
- Don’t ever lower the verbosity if verbosity minimum is set,
- but always push _something_
- quippy.system_module.verbosity_push_decrement([n])[source]
Defined at System.fpp lines 2433-2438
- Parameters:
- nint
- push the current value - n onto the stack
- quippy.system_module.verbosity_push_increment([n])[source]
Defined at System.fpp lines 2425-2430
- Parameters:
- nint
- push the current value + n onto the stack
- quippy.system_module.verbosity_set_minimum(verbosity)[source]
Defined at System.fpp lines 2442-2445
- Parameters:
- verbosityint
- set the minimum verbosity value, by pushing value onto
- stack and pushing 1 on to verbosity_cascade_stack
- quippy.system_module.verbosity_to_str(val)[source]
Defined at System.fpp lines 2363-2379
- Parameters:
- valint
- Returns:
- strstr
- Map from verbsoity codes to descriptive strings