#include <scheduler.hpp>
Definition at line 44 of file scheduler.hpp.
Scheduler::Scheduler |
( |
const Options & |
opt | ) |
|
Definition at line 39 of file scheduler.cpp.
45 infilepath = boost::filesystem::absolute(infilepath);
46 outfilepath = boost::filesystem::absolute(outfilepath);
49 parse_job_file(infilepath);
boost::filesystem::path jobfilename
Definition at line 156 of file scheduler.cpp.
160 for(
unsigned int i=0; i<tasks.size(); i++) {
161 boost::chrono::high_resolution_clock::time_point t0 = boost::chrono::high_resolution_clock::now();
162 double time_left = stop_callback.
time_left().count();
163 if (stop_callback.
valid() && time_left < 0)
167 std::cout <<
"Task " << i+1 <<
" finished." << std::endl;
172 std::cout <<
"Running task " << i+1 <<
"." << std::endl;
173 if (!boost::filesystem::exists(tasks[i].out))
174 copy(tasks[i].in, tasks[i].out);
177 run_sim(tasks[i].in, tasks[i].out, time_left);
181 boost::throw_exception( std::logic_error(
"illegal Task status"));
183 boost::chrono::high_resolution_clock::time_point t1 = boost::chrono::high_resolution_clock::now();
184 std::cout <<
"This task took " << boost::chrono::duration<double>(t1-t0) <<
"." << std::endl;
187 std::cout <<
"Finished with everything." << std::endl;
189 std::cout <<
"Time limit exceeded." << std::endl;
boost::chrono::duration< double > time_left() const
void run_sim(const boost::filesystem::path &infile, const boost::filesystem::path &outfile, bool write_xml=false, double time_limit=-1.)
The documentation for this class was generated from the following files: