diff --git a/sched/sample_assimilator.cpp b/sched/sample_assimilator.cpp index fc1beafbe0..deff69ce74 100644 --- a/sched/sample_assimilator.cpp +++ b/sched/sample_assimilator.cpp @@ -34,10 +34,14 @@ using std::vector; using std::string; +const char* outdir = "sample_results"; + int write_error(char* p) { static FILE* f = 0; if (!f) { - f = fopen(config.project_path("sample_results/errors"), "a"); + char path[1024]; + sprintf(path, "%s/errors", outdir); + f = fopen(config.project_path(path), "a"); if (!f) return ERR_FOPEN; } fprintf(f, "%s", p); @@ -45,16 +49,23 @@ int write_error(char* p) { return 0; } -int assimilate_handler_init(int, char**) { +int assimilate_handler_init(int argc, char** argv) { + for (int i=1; i