diff --git a/src/usher-sampled/driver/main.cpp b/src/usher-sampled/driver/main.cpp index b6a42d49..4063d907 100644 --- a/src/usher-sampled/driver/main.cpp +++ b/src/usher-sampled/driver/main.cpp @@ -429,6 +429,7 @@ int main(int argc, char **argv) { if (options.initial_optimization_radius<=0) { options.parsimony_threshold=INT_MAX; } + num_threads=std::max(2u,num_threads); options.desired_optimization_msec=optimiation_minutes*60000; fprintf(stderr, "Num threads %d\n",num_threads); #ifdef __linux diff --git a/src/usher-sampled/driver/socket.cpp b/src/usher-sampled/driver/socket.cpp index 6c31269c..bd3b7552 100644 --- a/src/usher-sampled/driver/socket.cpp +++ b/src/usher-sampled/driver/socket.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -399,7 +400,7 @@ static void child_proc(int fd, TreeCollectionPtr &trees_ptr) { tbb::task_scheduler_init init(num_threads); if (existing_samples != "") { MAT::Tree &tree = iter->second->expanded_tree; - std::fstream sample_file(existing_samples); + std::fstream sample_file(existing_samples,std::ios_base::in); std::string sample_name; std::vector nodes_to_extract; while (sample_file) {