3 #include <carl-settings/settings_utils.h>
14 namespace fs = std::filesystem;
85 template<
typename Jobs>
88 std::ofstream jobsfile(filename);
89 BENCHMAX_LOG_DEBUG(
"benchmax.slurm",
"Taking jobs " << range.first <<
".." << (range.second-1));
91 for (std::size_t i = range.first; i < range.second; ++i) {
92 const auto& r = jobs[i];
93 jobsfile << std::get<0>(r)->getCommandline(std::get<1>(r)) << std::endl;
112 std::string
parse_result_info(
const std::string& content,
const std::string& name);
#define BENCHMAX_LOG_DEBUG(channel, msg)
Log debug messages.
Represents a set of jobs, constructed as the cartesian product of a set of tools and a set of benchma...
static void remove(V &ts, const T &t)
void clear_directory(const fs::path &basedir)
Clear log files from directory.
std::string generate_submit_file(const SubmitfileProperties &p)
Generate a submit file for Slurm with the given properties.
void remove_log_files(const std::vector< fs::path > &files, bool remove)
Remove the given list of files.
void archive_log_files(const ArchiveProperties &p)
Put all log files into an archive.
std::string generate_submit_file_chunked(const ChunkedSubmitfileProperties &p)
void generate_jobs_file(const std::string &filename, std::pair< std::size_t, std::size_t > range, const Jobs &jobs)
int parse_job_id(const std::string &output)
Parses the job id from the output of sbatch.
std::vector< fs::path > collect_result_files(const fs::path &basedir)
Collects all result files in the given base directory for this job id.
std::string parse_result_info(const std::string &content, const std::string &name)
Parse a single result information from the output.
bool is_job_finished(int jobid)
Checks if the given job is finished.
All properties needed to archive log files.
std::string filename_archive
Filename of the archive.
std::string tmp_dir
Temporary directory to look for output files.
All properties needed to create a submit file.
carl::settings::duration grace_time
Grace time in seconds.
std::string tmp_dir
Temporary directory for log files.
std::size_t slice_size
Slice size.
carl::settings::binary_quantity limit_memory
Memory limit in megabytes.
carl::settings::duration limit_time
Time limit in seconds.
std::string filename_jobs
Filename of the job list file.
std::string file_suffix
Suffix for job and submit file.
std::size_t array_size
Array size.
std::pair< std::size_t, std::size_t > job_range
This slice size.
All properties needed to create a submit file.
carl::settings::duration grace_time
Grace time in seconds.
carl::settings::duration limit_time
Time limit in seconds.
std::size_t slices
Number of slices.
std::string file_suffix
Suffix for job and submit file.
std::size_t tasks
Number of tasks.
std::string tmp_dir
Temporary directory for log files.
std::string filename_jobs
Filename of the job list file.
carl::settings::binary_quantity limit_memory
Memory limit in megabytes.