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

Data Structures

struct  ArchiveProperties
 All properties needed to archive log files. More...
 
struct  SubmitfileProperties
 All properties needed to create a submit file. More...
 
struct  ChunkedSubmitfileProperties
 All properties needed to create a submit file. More...
 

Functions

void archive_log_files (const ArchiveProperties &p)
 Put all log files into an archive. More...
 
std::vector< fs::path > collect_result_files (const fs::path &basedir)
 Collects all result files in the given base directory for this job id. More...
 
std::string generate_submit_file (const SubmitfileProperties &p)
 Generate a submit file for Slurm with the given properties. More...
 
std::string generate_submit_file_chunked (const ChunkedSubmitfileProperties &p)
 
int parse_job_id (const std::string &output)
 Parses the job id from the output of sbatch. More...
 
std::string parse_result_info (const std::string &content, const std::string &name)
 Parse a single result information from the output. More...
 
void remove_log_files (const std::vector< fs::path > &files, bool remove)
 Remove the given list of files. More...
 
void clear_directory (const fs::path &basedir)
 Clear log files from directory. More...
 
bool is_job_finished (int jobid)
 Checks if the given job is finished. More...
 
template<typename Jobs >
void generate_jobs_file (const std::string &filename, std::pair< std::size_t, std::size_t > range, const Jobs &jobs)
 

Function Documentation

◆ archive_log_files()

void benchmax::slurm::archive_log_files ( const ArchiveProperties p)

Put all log files into an archive.

Definition at line 11 of file SlurmUtilities.cpp.

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

◆ clear_directory()

void benchmax::slurm::clear_directory ( const fs::path &  basedir)

Clear log files from directory.

Parameters
basedirBase directory to search in.

Definition at line 193 of file SlurmUtilities.cpp.

Here is the caller graph for this function:

◆ collect_result_files()

std::vector< fs::path > benchmax::slurm::collect_result_files ( const fs::path &  basedir)

Collects all result files in the given base directory for this job id.

Parameters
basedirBase directory to search in.
jobidID of slurm job.
Returns
List of result files.

Definition at line 27 of file SlurmUtilities.cpp.

Here is the caller graph for this function:

◆ generate_jobs_file()

template<typename Jobs >
void benchmax::slurm::generate_jobs_file ( const std::string &  filename,
std::pair< std::size_t, std::size_t >  range,
const Jobs jobs 
)

Definition at line 86 of file SlurmUtilities.h.

Here is the caller graph for this function:

◆ generate_submit_file()

std::string benchmax::slurm::generate_submit_file ( const SubmitfileProperties p)

Generate a submit file for Slurm with the given properties.

Parameters
pCollection of all information needed.
Returns
The filename of the submit file.

Definition at line 44 of file SlurmUtilities.cpp.

◆ generate_submit_file_chunked()

std::string benchmax::slurm::generate_submit_file_chunked ( const ChunkedSubmitfileProperties p)

Definition at line 101 of file SlurmUtilities.cpp.

Here is the caller graph for this function:

◆ is_job_finished()

bool benchmax::slurm::is_job_finished ( int  jobid)

Checks if the given job is finished.

Parameters
jobidThe job id.
Returns
True if the job is completed.

Definition at line 213 of file SlurmUtilities.cpp.

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

◆ parse_job_id()

int benchmax::slurm::parse_job_id ( const std::string &  output)

Parses the job id from the output of sbatch.

Parameters
outputOutput of sbatch.
Returns
Slurm job id.

Definition at line 158 of file SlurmUtilities.cpp.

Here is the caller graph for this function:

◆ parse_result_info()

std::string benchmax::slurm::parse_result_info ( const std::string &  content,
const std::string &  name 
)

Parse a single result information from the output.

Parameters
contentResult information output.
nameInformation to be parsed.
Returns
Information specified in the output.

Definition at line 170 of file SlurmUtilities.cpp.

Here is the caller graph for this function:

◆ remove_log_files()

void benchmax::slurm::remove_log_files ( const std::vector< fs::path > &  files,
bool  remove 
)

Remove the given list of files.

Parameters
filesList of files.
removeBoolean flag whether to actually remove files.

Definition at line 182 of file SlurmUtilities.cpp.

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