diff --git a/data/bpcomp b/data/bpcomp deleted file mode 100755 index a4e4d057..00000000 Binary files a/data/bpcomp and /dev/null differ diff --git a/data/cvrep b/data/cvrep deleted file mode 100755 index b905bb93..00000000 Binary files a/data/cvrep and /dev/null differ diff --git a/data/pb_mpi b/data/pb_mpi deleted file mode 100755 index 2b9d0f5f..00000000 Binary files a/data/pb_mpi and /dev/null differ diff --git a/data/readpb_mpi b/data/readpb_mpi deleted file mode 100755 index 431f4a77..00000000 Binary files a/data/readpb_mpi and /dev/null differ diff --git a/data/tracecomp b/data/tracecomp deleted file mode 100755 index bbc5b104..00000000 Binary files a/data/tracecomp and /dev/null differ diff --git a/sources/BipartitionList.cpp b/sources/BipartitionList.cpp index 5aa27a98..411f6901 100644 --- a/sources/BipartitionList.cpp +++ b/sources/BipartitionList.cpp @@ -13,6 +13,7 @@ along with PhyloBayes. If not, see . **********************/ +#include #include "phylo.h" // --------------------------------------------------------------------------------- @@ -57,7 +58,7 @@ double BPCompare(string* ChainName, int P, string reftreename, int burnin, int e } } BipartitionList** bplist = new BipartitionList*[P]; - TaxaParameters* taxaparam = 0; + TaxaParameters* taxaparam = 0; BipartitionList* refbplist = 0; if (verbose) { @@ -141,13 +142,14 @@ double BPCompare(string* ChainName, int P, string reftreename, int burnin, int e int bpsize = mergedbplist->GetSize(); - double diff[bpsize]; - double refdiff[bpsize]; - double prob[Q][bpsize]; - double length[Q][bpsize]; - double meanprob[bpsize]; - double refprob[bpsize]; - double reflength[bpsize]; + vector diff(bpsize); + vector refdiff(bpsize); + vector > prob(Q, vector(bpsize)); + vector > length(Q, vector(bpsize)); + vector meanprob(bpsize); + vector refprob(bpsize); + vector reflength(bpsize); + for (int k=0; k burnin) { if (rootonly) { @@ -635,10 +637,10 @@ int BipartitionList::IsEqualTo(BipartitionList* comp) { void BipartitionList::Prune(PBTree* inTree) { - + if (inTree->IsDichotomous()) { cerr << "in BipartitionList::Prune : warning, tree is dichotomous\n"; - } + } Flush(); inTree->GetRoot()->BipartitionPruning(this); Modulo(); @@ -647,7 +649,7 @@ void BipartitionList::Prune(PBTree* inTree) { void BipartitionList::PruneWithSupports(PBTree* inTree) { - + Flush(); inTree->GetRoot()->BipartitionPruningWithSupports(this); Modulo(); @@ -664,7 +666,7 @@ BipartitionList::BipartitionList( TreeList* inTreeList, double* weightarray, dou mParam = inTreeList->GetParameters(); BasicAllocation(); - + for (int i=0; iGetSize(); i++) { BipartitionList tempList(mParam); inTreeList->GetTree(i)->Trichotomise(); @@ -694,7 +696,7 @@ BipartitionList::~BipartitionList() { delete[] mCompatibleArray; } - + // --------------------------------------------------------------------------------- // Sort(); // reverse order ! // --------------------------------------------------------------------------------- @@ -723,12 +725,12 @@ void BipartitionList::Sort() { } } } - + // --------------------------------------------------------------------------------- // GetHisto(); // --------------------------------------------------------------------------------- - + void BipartitionList::GetHisto(int* histo, int ncat) { for (int i=0; iPermutTaxa(permut); - } + } delete[] permut; } return ok; @@ -781,7 +783,7 @@ int BipartitionList::RegisterWith(TaxaParameters* inParam) { // --------------------------------------------------------------------------------- void BipartitionList::Truncate(double cutoff) { - + int i=0; while ( (i= cutoff)) { i++; @@ -802,21 +804,21 @@ void BipartitionList::Flush(){ mSize = 0; mWeight = 0; } - + // --------------------------------------------------------------------------------- // Pop() // --------------------------------------------------------------------------------- void BipartitionList::Pop(){ - + if (! mSize) { cerr << "error in BipartitionList : pop called on list of size 0\n"; exit(1); } mSize--; } - + // --------------------------------------------------------------------------------- // Modulo @@ -890,20 +892,20 @@ void BipartitionList::Suppress(const Bipartition& bp) { mBipartitionArray[i]->Suppress(bp); } } - + // --------------------------------------------------------------------------------- // GetIndex() // --------------------------------------------------------------------------------- int BipartitionList::GetIndex(const Bipartition& inPartition){ - + int i=0; while ( (i mAllocatedSize) { Reallocate(); @@ -1077,7 +1079,7 @@ void BipartitionList::WriteToStream(ostream& os, int header, int verbose) { if (header) { mParam->WriteToStream(os); } - os << "BipartitionList\n"; + os << "BipartitionList\n"; os << "Size " << mSize << '\n'; os << "Weight " << mWeight << '\n'; os << '\n'; @@ -1113,12 +1115,12 @@ void BipartitionList::ReadFromStream(istream& is) { mParam->ReadFromStream(is); } else if (temp == "BipartitionList") { - + int size; is >> temp >> size >> temp >> mWeight; cerr << size << '\n'; mSize = 0; - + for (int i=0; i> temp; } } - diff --git a/sources/Makefile b/sources/Makefile index 5bd96727..6f002212 100644 --- a/sources/Makefile +++ b/sources/Makefile @@ -1,6 +1,6 @@ CC=mpic++ -CPPFLAGS= -w -O3 -c -LDFLAGS= -O3 +CPPFLAGS= -w -O3 -flto -c +LDFLAGS= -O3 -flto SRCS= TaxonSet.cpp Tree.cpp Random.cpp SequenceAlignment.cpp CodonSequenceAlignment.cpp \ StateSpace.cpp CodonStateSpace.cpp ZippedSequenceAlignment.cpp SubMatrix.cpp \ GTRSubMatrix.cpp CodonSubMatrix.cpp linalg.cpp Chrono.cpp BranchProcess.cpp \