OpenFUSIONToolkit runtime environment class.
|
| __del__ (self) |
| Destroy environment and cleanup known temporary files.
|
|
| __init__ (self, debug_level=0, nthreads=2, unique_tempfiles='global', abort_callback=True) |
| Initialize OFT runtime object.
|
|
| float_is_disabled (self, val) |
| Check if float is set to a value indicated its usage is "disabled".
|
|
| get_c_errorbuff (self) |
| Get properly-sized error string buffer for calls to OFT compiled API.
|
|
| path2c (self, path) |
| Convert general strings to C-compatible objects calls to OFT compiled API.
|
|
| set_debug_level (self, debug_level) |
| Set debug verbosity level.
|
|
| set_num_threads (self, nthreads) |
| Set the number of OpenMP threads to use.
|
|
| string2c (self, string) |
| Convert general strings to C-compatible objects calls to OFT compiled API.
|
|
| unique_tmpfile (self, filename) |
| Get unique temporary filename.
|
|
| update_oft_in (self) |
| Update input file with current settings (see oft_in_groups)
|
|
◆ __init__()
__init__ |
( |
|
self, |
|
|
|
debug_level = 0 , |
|
|
|
nthreads = 2 , |
|
|
|
unique_tempfiles = 'global' , |
|
|
|
abort_callback = True |
|
) |
| |
Initialize OFT runtime object.
- Parameters
-
debug_level | Level of debug printing (0-3) |
nthreads | Number of threads for execution |
unique_tempfiles | Method for temporary file creation ('global': Create unique folder in global temporary space, 'local_dir': Create unique folder in current working directory, 'local_file': Use current working directory and append unique identifier to filenames, 'none': Use non-unique names in local directory; can lead to conflict with multiple instances) |
abort_callback | Use callback for "graceful" abort |
◆ __del__()
Destroy environment and cleanup known temporary files.
◆ float_is_disabled()
float_is_disabled |
( |
|
self, |
|
|
|
val |
|
) |
| |
Check if float is set to a value indicated its usage is "disabled".
- Parameters
-
- Returns
- Value is within 10% of
self.float_disable_flag
◆ get_c_errorbuff()
Get properly-sized error string buffer for calls to OFT compiled API.
◆ path2c()
Convert general strings to C-compatible objects calls to OFT compiled API.
- Parameters
-
- Returns
c_char_p
object containing path string value
◆ set_debug_level()
set_debug_level |
( |
|
self, |
|
|
|
debug_level |
|
) |
| |
Set debug verbosity level.
- Parameters
-
debug_level | New value for debug level (must be in range [0,3]) |
◆ set_num_threads()
set_num_threads |
( |
|
self, |
|
|
|
nthreads |
|
) |
| |
Set the number of OpenMP threads to use.
- Parameters
-
nthreads | Number of threads to use for subsequent OpenMP parallel regions |
◆ string2c()
string2c |
( |
|
self, |
|
|
|
string |
|
) |
| |
Convert general strings to C-compatible objects calls to OFT compiled API.
- Parameters
-
- Returns
c_char_p
object containing string value
◆ unique_tmpfile()
unique_tmpfile |
( |
|
self, |
|
|
|
filename |
|
) |
| |
Get unique temporary filename.
- Parameters
-
filename | Base non-unique filename |
- Returns
- Unique filepath in suitable temporary location
◆ update_oft_in()
Update input file with current settings (see oft_in_groups)
◆ debug_level
◆ float_disable_flag
Value for marking a float quantity as disabled.
◆ ncpus
Number of physical CPUs (if multiple types are present only "performance" are counted)
◆ nthreads
Number of threads for execution.
◆ oft_error_slen
◆ oft_ifile
Input filename for execution environment.
◆ oft_in_groups
◆ oft_path_slen
◆ oft_slen
◆ os
◆ pid
ID of Python interpreter process.
◆ tempdir
Directory for temporary files.
The documentation for this class was generated from the following file:
- /home/runner/work/OpenFUSIONToolkit/OpenFUSIONToolkit/src/python/OpenFUSIONToolkit/_core.py