CondorManager API Reference
- class RIFT.simulation_manager.CondorManager.SimulationArchiveOnLocalDiskIntegratedCondorQueue(**kwargs)
Bases:
SimulationArchiveOnLocalDiskExternalQueueSimulation archive whose entries are queued and run via HTCondor.
- Lifecycle:
register_simulation(sim_params) -> entry created on disk, status=’ready’ generate_dag_for_all_ready_simulations() -> DAG built, status flips to ‘submit_ready’ submit_dag(dag_path) -> condor_submit_dag invoked (optional) refresh_status_from_condor() -> scrape condor_q, mark ‘running’ refresh_status_from_disk() -> output present? mark ‘complete’
- build_master_job(tag=None, **kwargs)
- generate_dag_for_all_ready_simulations(tag='sim_dag', **kwargs)
- generate_simulation(sim_params, **kwargs)
In a condor-backed archive, ‘generate’ = ‘register’. The generator runs in the submitted job, not at this call site.
- get_node_for_dag(sim_id_internal=None, **kwargs)
- refresh_status_from_condor()
Use the htcondor python bindings (if available) to inspect the schedd. Sims whose nodes are still in the queue are marked ‘running’; sims whose nodes left the queue but whose output is missing are marked ‘stuck’. Output-on-disk is the authoritative ‘complete’ signal — call refresh_status_from_disk() afterwards.
Works with either the modern htcondor2 bindings or the legacy htcondor bindings; the choice is made at module import time.
- submit_dag(dag_path)
Submit a DAG via condor_submit_dag. Captures the cluster id for later schedd queries. Returns True on success.
- RIFT.simulation_manager.CondorManager.condor_check_complete(params=None, sim_path=None, sim_meta_path=None, sim_annotation=None)
_internal_check_complete for condor-backed archives: a sim is complete iff its output file exists and is non-empty. We deliberately do NOT consult the schedd here — the schedd tells us about running jobs, but completion is defined by output on disk (i.e. the worker actually finished and wrote its result).
TODO: Implement more robust failure detection by scanning .err logs for common crash signatures (e.g., segfaults, OOM) to distinguish between ‘stuck’ (slow) and ‘failed’ jobs.
- RIFT.simulation_manager.CondorManager.default_condor_build_job(tag='job_tag_default', exe=None, arg_str=None, sim_path=None, universe='vanilla', use_singularity=False, use_osg=False, singularity_image_has_exe=False, singularity_image=False, use_oauth_files=False, transfer_files=None, transfer_output_files=None, request_gpus=False, request_disk=False, request_memory=False, condor_commands=None, log_dir=None, **kwargs)
- RIFT.simulation_manager.CondorManager.safely_quote_arg_str(s)