SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
benchmax::CondorBackend Class Reference

Backend for the HTCondor batch system. More...

#include <CondorBackend.h>

Inheritance diagram for benchmax::CondorBackend:
Collaboration diagram for benchmax::CondorBackend:

Public Member Functions

void run (const Jobs &, bool)
 Run all tools on all benchmarks. More...
 
bool suspendable () const
 
void process_results (const Jobs &jobs, bool check_finished)
 
void addResult (const Tool *tool, const fs::path &file, BenchmarkResult &&result)
 Add a result. More...
 

Protected Member Functions

virtual void execute (const Tool *, const fs::path &)
 No-op version of execute. More...
 
virtual void startTool (const Tool *)
 Hook for every tool at the beginning. More...
 
virtual void finalize ()
 Hook to allow for asynchronous backends to wait for jobs to terminate. More...
 
void madeProgress (std::size_t files=1)
 Can be called to give information about the current progress, if available. More...
 
virtual bool collect_results (const Jobs &, bool)
 
void sanitize_results (const Jobs &jobs) const
 
void write_results (const Jobs &jobs) const
 

Protected Attributes

std::size_t mExpectedJobs
 Number of jobs that should be run. More...
 
std::atomic< std::size_t > mFinishedJobs
 Number of jobs that are finished. More...
 
std::atomic< std::size_t > mLastPercent
 Percentage of finished jobs when madeProgress() was last called. More...
 

Private Member Functions

std::string generateSubmitFile (std::size_t ID, const Tool &tool, const BenchmarkSet &b)
 Generate a submit file for the given job. More...
 
void collectResults (std::size_t ID)
 Collect job results for the given id. More...
 
void runAndWait (std::size_t ID, const std::string &submitFile, std::atomic< bool > &it)
 Run the given job and wait for its results. More...
 

Private Attributes

std::list< std::atomic< bool > > processes
 List of processes that are currently running. More...
 
Results mResults
 Results of already completed jobs. More...
 

Detailed Description

Backend for the HTCondor batch system.

Currently submits all jobs individually and asynchronously waits for them to finish.

Definition at line 23 of file CondorBackend.h.

Member Function Documentation

◆ addResult()

void benchmax::Backend::addResult ( const Tool tool,
const fs::path &  file,
BenchmarkResult &&  result 
)
inlineinherited

Add a result.

Definition at line 97 of file Backend.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collect_results()

virtual bool benchmax::Backend::collect_results ( const Jobs ,
bool   
)
inlineprotectedvirtualinherited

Reimplemented in benchmax::SlurmBackend.

Definition at line 60 of file Backend.h.

Here is the caller graph for this function:

◆ collectResults()

void benchmax::CondorBackend::collectResults ( std::size_t  ID)
inlineprivate

Collect job results for the given id.

Definition at line 60 of file CondorBackend.h.

Here is the caller graph for this function:

◆ execute()

virtual void benchmax::CondorBackend::execute ( const Tool ,
const fs::path &   
)
inlineprotectedvirtual

No-op version of execute.

Reimplemented from benchmax::Backend.

Definition at line 26 of file CondorBackend.h.

◆ finalize()

virtual void benchmax::Backend::finalize ( )
inlineprotectedvirtualinherited

Hook to allow for asynchronous backends to wait for jobs to terminate.

Definition at line 45 of file Backend.h.

Here is the caller graph for this function:

◆ generateSubmitFile()

std::string benchmax::CondorBackend::generateSubmitFile ( std::size_t  ID,
const Tool tool,
const BenchmarkSet b 
)
inlineprivate

Generate a submit file for the given job.

Definition at line 32 of file CondorBackend.h.

Here is the call graph for this function:

◆ madeProgress()

void benchmax::Backend::madeProgress ( std::size_t  files = 1)
inlineprotectedinherited

Can be called to give information about the current progress, if available.

Definition at line 51 of file Backend.h.

Here is the caller graph for this function:

◆ process_results()

void benchmax::Backend::process_results ( const Jobs jobs,
bool  check_finished 
)
inlineinherited

Definition at line 88 of file Backend.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void benchmax::CondorBackend::run ( const Jobs ,
bool   
)
inline

Run all tools on all benchmarks.

Definition at line 85 of file CondorBackend.h.

◆ runAndWait()

void benchmax::CondorBackend::runAndWait ( std::size_t  ID,
const std::string &  submitFile,
std::atomic< bool > &  it 
)
inlineprivate

Run the given job and wait for its results.

Definition at line 72 of file CondorBackend.h.

Here is the call graph for this function:

◆ sanitize_results()

void benchmax::Backend::sanitize_results ( const Jobs jobs) const
inlineprotectedinherited

Definition at line 61 of file Backend.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startTool()

virtual void benchmax::Backend::startTool ( const Tool )
inlineprotectedvirtualinherited

Hook for every tool at the beginning.

Can be used to upload the tool to some remote system.

Definition at line 41 of file Backend.h.

Here is the caller graph for this function:

◆ suspendable()

bool benchmax::Backend::suspendable ( ) const
inlineinherited

Definition at line 85 of file Backend.h.

Here is the caller graph for this function:

◆ write_results()

void benchmax::Backend::write_results ( const Jobs jobs) const
inlineprotectedinherited

Definition at line 70 of file Backend.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ mExpectedJobs

std::size_t benchmax::Backend::mExpectedJobs
protectedinherited

Number of jobs that should be run.

Definition at line 29 of file Backend.h.

◆ mFinishedJobs

std::atomic<std::size_t> benchmax::Backend::mFinishedJobs
protectedinherited

Number of jobs that are finished.

Definition at line 31 of file Backend.h.

◆ mLastPercent

std::atomic<std::size_t> benchmax::Backend::mLastPercent
protectedinherited

Percentage of finished jobs when madeProgress() was last called.

Definition at line 33 of file Backend.h.

◆ mResults

Results benchmax::Backend::mResults
privateinherited

Results of already completed jobs.

Definition at line 26 of file Backend.h.

◆ processes

std::list<std::atomic<bool> > benchmax::CondorBackend::processes
private

List of processes that are currently running.

Definition at line 29 of file CondorBackend.h.


The documentation for this class was generated from the following file: