@@ -2308,14 +2308,14 @@ RealNumType cmaple::Tree::improveEntireTreeParallel(const TreeSearchType tree_se
23082308 #pragma omp critical
23092309 {
23102310 all_SPR_found_vec.insert (all_SPR_found_vec.end (), SPR_found_vec.begin (), SPR_found_vec.end ());
2311- if (cmaple::verbose_mode >= cmaple::VB_DEBUG)
2311+ if (cmaple::verbose_mode >= cmaple::VB_DEBUG && tree_search_type != FAST_TREE_SEARCH )
23122312 {
23132313 std::cout << " Thread " << thread_id << " found " << SPR_found_vec.size () << " SPR moves." << std::endl;
23142314 }
23152315 }
23162316 }
23172317
2318- if (cmaple::verbose_mode >= cmaple::VB_DEBUG)
2318+ if (cmaple::verbose_mode >= cmaple::VB_DEBUG && tree_search_type != FAST_TREE_SEARCH )
23192319 {
23202320 std::cout << " All threads found " << all_SPR_found_vec.size () << " SPR moves." << std::endl;
23212321 }
@@ -2333,19 +2333,23 @@ RealNumType cmaple::Tree::improveEntireTreeParallel(const TreeSearchType tree_se
23332333 RealNumType total_improvement = 0 ;
23342334
23352335 // sequentially search and apply SPRs on nodes found in the above step
2336- for (const auto &item : all_SPR_found_vec) {
2337- const cmaple::Index& index = item.first ;
2338- PhyloNode& node = nodes[index.getVectorIndex ()];
2339-
2340- // search and apply SPR on that node
2341- std::vector<std::pair<cmaple::Index, double >> SPR_found_vec;
2342- RealNumType improvement =
2336+ if (tree_search_type != FAST_TREE_SEARCH)
2337+ {
2338+ for (const auto &item : all_SPR_found_vec) {
2339+ const cmaple::Index& index = item.first ;
2340+ PhyloNode& node = nodes[index.getVectorIndex ()];
2341+
2342+ // search and apply SPR on that node
2343+ std::vector<std::pair<cmaple::Index, double >> SPR_found_vec;
2344+ RealNumType improvement =
23432345 improveSubTree<num_states>(index, node,
23442346 tree_search_type, short_range_search, SPR_found_vec);
2345-
2346- // update total_improvement
2347- total_improvement += improvement;
2347+
2348+ // update total_improvement
2349+ total_improvement += improvement;
2350+ }
23482351 }
2352+
23492353
23502354 return total_improvement;
23512355}
0 commit comments