Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Fix crash with edge-unlinked (-sp) and -bnni option (reported by Mark…
Browse files Browse the repository at this point in the history
… Miller)
  • Loading branch information
bqminh committed Feb 6, 2019
1 parent 692edfd commit 64d47b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,10 @@ if (IQTREE_FLAGS MATCHES "mpi")
add_library(mympi utils/TreeCollection.cpp utils/ObjectStream.cpp)
endif()

if (NOT IQTREE_FLAGS MATCHES "single")
if (BINARY32)
if (NOT IQTREE_FLAGS MATCHES "single")
if (APPLE)
link_directories(${PROJECT_SOURCE_DIR}/libmac)
elseif (BINARY32)
link_directories(${PROJECT_SOURCE_DIR}/lib32)
else()
link_directories(${PROJECT_SOURCE_DIR}/lib)
Expand Down
10 changes: 9 additions & 1 deletion tree/iqtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2824,7 +2824,15 @@ void IQTree::refineBootTrees() {
boot_tree->setNumThreads(num_threads);

// load the current ufboot tree
boot_tree->readTreeString(boot_trees[sample]);
// 2019-02-06: fix crash with -sp and -bnni
boot_tree->PhyloTree::readTreeString(boot_trees[sample]);

if (boot_tree->isSuperTree() && params->partition_type == BRLEN_OPTIMIZE) {
if (((PhyloSuperTree*)boot_tree)->size() > 1) {
// re-initialize branch lengths for unlinked model
boot_tree->wrapperFixNegativeBranch(true);
}
}

// TODO: check if this resolves the crash in reorientPartialLh()
boot_tree->initializeAllPartialLh();
Expand Down

0 comments on commit 64d47b5

Please sign in to comment.