Simulation Worker¶
-
delphin_6_automation.backend.simulation_worker.
create_submit_file
(sim_id: str, simulation_folder: str, computation_time: int, restart=False) → str[source]¶ Create a submit file for the DTU HPC queue system.
-
delphin_6_automation.backend.simulation_worker.
get_average_computation_time
(sim_id: str) → int[source]¶ Get the average time for this type of construction (2D or 1D)
Parameters: sim_id – Delphin entry id from database Returns: Average simulation time in minutes
-
delphin_6_automation.backend.simulation_worker.
github_updates
()[source]¶ - if general_interactions.get_github_version() != general_interactions.get_git_revision_hash():
- logger.info(‘New version of Delphin 6 Automation is available on Github!!’) return False
- else:
- return True
-
delphin_6_automation.backend.simulation_worker.
hpc_worker
(id_: str, folder='H:/ribuild')[source]¶ Solves a Delphin project through DTU HPC
-
delphin_6_automation.backend.simulation_worker.
local_worker
(id_: str) → Optional[bool][source]¶ Simulation worker. Supposed to be used with main simulation loop.
Parameters: id – Database entry ID from simulation queue Returns: True on success otherwise False
-
delphin_6_automation.backend.simulation_worker.
simulation_worker
(sim_location: str, folder='H:/ribuild') → None[source]¶ Solves Delphin projects in the database until interrupted
-
delphin_6_automation.backend.simulation_worker.
solve_delphin
(file: str, delphin_exe='C:/Program Files/IBK/Delphin 6.0/DelphinSolver.exe', verbosity_level=1) → bool[source]¶ Solves a delphin file locally
-
delphin_6_automation.backend.simulation_worker.
submit_job
(submit_file: str, sim_id: str) → None[source]¶ Submits a job (submit file) to the DTU HPC queue.
-
delphin_6_automation.backend.simulation_worker.
wait_until_finished
(sim_id: str, estimated_run_time: int, simulation_folder: str)[source]¶ Look for summary file. If it is created, continue. If it is not created and the estimated time runs out. Then submit a new job continuing the simulation from where it ended.