pyiron_base.jobs.job.extension.executable.Executable#
- class pyiron_base.jobs.job.extension.executable.Executable(path_binary_codes: List[str] | None = None, codename: str | None = None, module: str | None = None, overwrite_nt_flag: bool = False)[source]#
Bases:
HasDict- __init__(path_binary_codes: List[str] | None = None, codename: str | None = None, module: str | None = None, overwrite_nt_flag: bool = False)[source]#
Handle the path to the executable, as well as the version selection.
- Parameters:
codename (str) – name of the code str
path_binary_codes (list) – path to the binary codes as an absolute path
overwrite_nt_flag (bool)
Methods
__init__([path_binary_codes, codename, ...])Handle the path to the executable, as well as the version selection.
from_dict(obj_dict[, version])Populate the object from the serialized object.
get_input_for_subprocess_call(cores, threads)Get the input parameters for the subprocess call to execute the job
instantiate(obj_dict[, version])Create a blank instance of this class.
List all available exectuables in the path_binary_codes for the specified codename.
to_dict()Reduce the object to a dictionary.
Attributes
accept all of the return codes in this list as the result of a successful run
List all available exectuables in the path_binary_codes for the specified codename.
Default Version of the Available Executables i.e. specifically defined.
Get the executable path
Check if the message processing interface is activated.
Version of the Executable
- property accepted_return_codes: List[int]#
accept all of the return codes in this list as the result of a successful run
- Type:
list of int
- property available_versions: List[str]#
List all available exectuables in the path_binary_codes for the specified codename.
- Returns:
list of the available version
- Return type:
list
- property default_version: str#
Default Version of the Available Executables i.e. specifically defined
- Returns:
default_version
- Return type:
str
- property executable_path: str#
Get the executable path
- Returns:
absolute path
- Return type:
str
- from_dict(obj_dict: dict, version: str = None)#
Populate the object from the serialized object.
- Parameters:
obj_dict (dict) – data previously returned from
to_dict()version (str) – version tag written together with the data
- get_input_for_subprocess_call(cores: int, threads: int, gpus: int | None = None) Tuple[str | List[str], bool][source]#
Get the input parameters for the subprocess call to execute the job
- Parameters:
cores (int) – number of cores
threads (int) – number of threads
gpus (int/None) – number of gpus
- Returns:
executable and shell variables
- Return type:
str/ list, boolean
- classmethod instantiate(obj_dict: dict, version: str = None) Executable[source]#
Create a blank instance of this class.
This can be used when some values are already necessary for the objects __init__.
- Parameters:
obj_dict (dict) – data previously returned from
to_dict()version (str) – version tag written together with the data
- Returns:
a blank instance of the object that is sufficiently initialized to call
_from_dict()on it- Return type:
object
- list_executables() List[str][source]#
List all available exectuables in the path_binary_codes for the specified codename.
- Returns:
list of the available version
- Return type:
list
- property mpi: bool#
Check if the message processing interface is activated.
- Returns:
[True/False]
- Return type:
bool
- to_dict() dict#
Reduce the object to a dictionary.
- Returns:
serialized state of this object
- Return type:
dict
- property version: str#
Version of the Executable
- Returns:
version
- Return type:
str