pyiron_base.jobs.job.extension.server.generic module
Server object class which is connected to each job containing the technical details how the job is executed.
- class pyiron_base.jobs.job.extension.server.generic.Server(host=None, queue=None, cores=1, threads=1, gpus=None, run_mode='modal', new_hdf=True)
-
Generic Server object to handle the execution environment for the job
- Parameters:
host (str) – hostname of the local machine
queue (str) – queue name of the currently selected queue
cores (int) – number of cores
run_mode (pyiron_base.server.runmode.Runmode) – mode of the job [‘modal’, ‘non_modal’, ‘queue’, ‘manual’]
new_hdf (bool) – create a new HDF5 file [True/False] - default=True
- .. attribute:: send_to_db
boolean option to decide which jobs should be store in the external/public database.
- .. attribute:: structure_id
the structure ID to be linked to an external/public database.
- .. attribute:: host
the hostname of the current system.
- .. attribute:: queue
the queue selected for a current simulation.
- .. attribute:: cores
the number of cores selected for the current simulation.
- .. attribute:: run_time
the run time in seconds selected for the current simulation.
- .. attribute:: run_mode
the run mode of the job [‘modal’, ‘non_modal’, ‘queue’, ‘manual’]
- .. attribute:: memory_limit
the maximum amount of RAM allocated for the calculation in GB
- .. attribute:: new_hdf
defines whether a subjob should be stored in the same HDF5 file or in a new one.
- .. attribute:: executor
the executor can be used to execute the job object
- .. attribute:: future
the concurrent.futures.Future object for monitoring the execution of the job object
- property accept_crash
- property conda_environment_name
Get name of the conda environment the job should be executed in.
- Returns:
name of the conda environment
- Return type:
str
- property conda_environment_path
Get path of the conda environment the job should be executed in.
- Returns:
path of the conda environment
- Return type:
str
- property cores
The number of cores selected for the current simulation
- Returns:
number of cores
- Return type:
(int)
- db_entry()
connect all the info regarding the server into a single word that can be used e.g. as entry in a database
- Returns:
server info as single word
- Return type:
(str)
- property executor: Executor | None
Executor to execute the job object this server object is attached to in the background.
- Return type:
concurrent.futures.Executor
- from_dict(server_dict)
- from_hdf(hdf, group_name=None)
Recover Server object in HDF5 file :param hdf: HDF5 object :param group_name: node name in the HDF5 file
- property future: Future | None
Python concurrent.futures.Future object to track the status of the execution of the job this server object is attached to. This is an internal pyiron feature and most users never have to interact with the future object directly.
- Returns:
future object to track the status of the execution
- Return type:
concurrent.futures.Future
- property gpus
Total number of GPUs to use for this calculation.
- Returns:
Total number of GPUs to use for this calculation.
- Return type:
int
- static list_queues()
List the available Job scheduler provided by the system.
- Returns:
(list)
- property memory_limit
- property new_hdf
New_hdf5 defines whether a subjob should be stored in the same HDF5 file or in a new one.
- Returns:
[True / False]
- Return type:
(bool)
- property queue
The que selected for a current simulation
- Returns:
schedulers_name
- Return type:
(str)
- property queue_id
Get the queue ID - the ID in the queuing system is most likely not the same as the job ID.
- Returns:
queue ID
- Return type:
int
- property queue_list
List the available Job scheduler provided by the system.
- Returns:
(list)
- property queue_view
List the available Job scheduler provided by the system.
- Returns:
(pandas.DataFrame)
- property run_mode
Get the run mode of the job
- Returns:
- [‘modal’, ‘non_modal’, ‘queue’, ‘manual’, ‘thread’, ‘worker’,
’interactive’, ‘interactive_non_modal’, ‘srun’, ‘executor’]
- Return type:
(str/pyiron_base.server.runmode.Runmode)
- property run_time
The run time in seconds selected for the current simulation
- Returns:
run time in seconds
- Return type:
(int)
- property send_to_db
Get the boolean option to decide which jobs should be store in the external/public database
- Returns:
[True/False]
- Return type:
bool
- property structure_id
Get the structure ID to be linked to an external/public database
- Returns:
structure ID
- Return type:
int
- property threads
The number of threads selected for the current simulation
- Returns:
number of threads
- Return type:
(int)
- to_dict()
- to_hdf(hdf, group_name=None)
Store Server object in HDF5 file :param hdf: HDF5 object :param group_name: node name in the HDF5 file :type group_name: str
- static view_queues()
List the available Job scheduler provided by the system.
- Returns:
(pandas.DataFrame)