Skip to content

Commit 2541f3c

Browse files
authored
Merge pull request #22 from thomaskf/bugfix
Fixed the issue regarding the GHOST model with an option -nt AUTO
2 parents e61ee88 + 748f3f5 commit 2541f3c

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ find_package(Backtrace)
116116
# The version number.
117117
set (iqtree_VERSION_MAJOR 3)
118118
set (iqtree_VERSION_MINOR 0)
119-
set (iqtree_VERSION_PATCH ".0")
119+
set (iqtree_VERSION_PATCH ".1")
120120

121121
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
122122

tree/iqtree.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4686,6 +4686,11 @@ int PhyloTree::testNumThreads() {
46864686

46874687
cout << "BEST NUMBER OF THREADS: " << bestProc+1 << endl << endl;
46884688
setNumThreads(bestProc+1);
4689+
4690+
// clear the relative treelength arrays if it is GHOST model
4691+
if (isMixlen()) {
4692+
((PhyloTreeMixlen*)this)->clear_relative_treelen();
4693+
}
46894694

46904695
return bestProc+1;
46914696
#endif

tree/phylotreemixlen.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,13 @@ void PhyloTreeMixlen::hessian(const TVector &x, THessian &hessian) {
724724
}
725725
#endif
726726

727+
/**
728+
* clear the array "relative_treelen"
729+
*/
730+
void PhyloTreeMixlen::clear_relative_treelen() {
731+
relative_treelen.clear();
732+
}
733+
727734
// defining log-likelihood derivative function for EM algorithm
728735
void PhyloTreeMixlen::computeFuncDerv(double value, double &df, double &ddf) {
729736

tree/phylotreemixlen.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ class PhyloTreeMixlen : public IQTree
264264

265265
#endif
266266

267+
/**
268+
* clear the array "relative_treelen"
269+
*/
270+
void clear_relative_treelen();
271+
267272
protected:
268273

269274
/** relative rate, used to initialize branch lengths */

0 commit comments

Comments
 (0)