19 auto work_cstr = std::getenv(
"WORK");
20 if (work_cstr ==
nullptr) {
21 BENCHMAX_LOG_WARN(
"benchmax.preset",
"The preset rwth-slurm is selected but $WORK is not set. We use $WORK = \"work\" for now.");
23 std::string work(work_cstr !=
nullptr ? work_cstr :
"WORK");
24 carl::settings::default_to(values,
"backend", std::string(
"slurm"));
25 carl::settings::default_to(values,
"output-xml", std::string(
"stats_" + s.
rwth_slurm_name +
".xml"));
26 carl::settings::default_to(values,
"slurm.keep-logs",
true);
27 carl::settings::default_to(values,
"slurm.archive-logs", std::string(
"logs-" + s.
rwth_slurm_name));
28 carl::settings::default_to(values,
"slurm.tmp-dir", std::string(work +
"/" + s.
rwth_slurm_name));
29 carl::settings::default_to(values,
"slurm.sbatch-options", std::string(
"-C hpcwork"));
36 namespace po = boost::program_options;
37 auto& settings = settings::Settings::getInstance();
40 parser->add_finalizer([&s](
auto& values){
43 parser->add(
"Presets").add_options()
44 (
"preset.rwth-slurm", po::bool_switch(&s.rwth_slurm),
"Use SLURM on the RWTH HPC cluster")
45 (
"preset.rwth-slurm-name", po::value<std::string>(&s.rwth_slurm_name),
"Short name for file naming")
#define BENCHMAX_LOG_WARN(channel, msg)
Log warnings.
Generic class to manage settings parsing using boost::program_options.
void registerPresetSettings(SettingsParser *parser)
Registers preset settings with the settings parser.
bool finalize_preset_settings(PresetSettings &s, boost::program_options::variables_map &values)
Postprocess preset settings.
std::string rwth_slurm_name
Name for this job.
bool rwth_slurm
Use slurm on the RWTH HPC cluster.