From 8643a23b1a918859b3793c6f9c9b734cd8e50665 Mon Sep 17 00:00:00 2001 From: wcancino Date: Mon, 15 Jun 2009 13:11:43 +0000 Subject: [PATCH] git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1585 331e1502-861f-0410-8da2-ba01fb791d7f --- .../PhyloMOEA/PhyloMOEA/CMakeLists.txt | 18 ++++++++++++++++++ .../branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp | 3 ++- .../PhyloMOEA/PhyloMOEA/PhyloMOEO_archive.h | 1 + .../PhyloMOEA/likelihoodcalculator.cpp | 10 +++++----- ...oFrontByFrontCrowdingDiversityAssignment2.h | 10 +++++----- .../PhyloMOEA/parsimonycalculator.cpp | 1 + 6 files changed, 32 insertions(+), 11 deletions(-) diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/CMakeLists.txt b/contribution/branches/PhyloMOEA/PhyloMOEA/CMakeLists.txt index b1c5cc324..e43eb5f3e 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/CMakeLists.txt +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/CMakeLists.txt @@ -47,11 +47,29 @@ SET( TESTOMP_SOURCES eigensolver.cpp testomp.cpp ) +SET( UTILITARY_SOURCES eigensolver.cpp + likelihoodcalculator.cpp + matrixutils.cpp + probmatrixcontainer.cpp + parsimonycalculator.cpp + ProbMatrix.cpp + RandomNr.cpp + Sequences.cpp + SubsModel.cpp + phylotreeIND.cpp + treeIterator.cpp + utils.cpp + likoptimizer.cpp + utility.cpp +) + ADD_EXECUTABLE( PhyloMOEA ${PHYLOMOEA_SOURCES} ) ADD_EXECUTABLE( testomp ${TESTOMP_SOURCES} ) +ADD_EXECUTABLE( utility ${UTILITARY_SOURCES} ) TARGET_LINK_LIBRARIES(PhyloMOEA gsl gslcblas GTL eo eoutils ga moeo cma peo rmc_mpi xml2) TARGET_LINK_LIBRARIES(testomp gsl gslcblas GTL eo eoutils ga moeo cma peo rmc_mpi xml2 gomp) +TARGET_LINK_LIBRARIES(utility gsl gslcblas GTL eo eoutils ga moeo cma peo rmc_mpi xml2 gomp) INSTALL( TARGETS PhyloMOEA RUNTIME DESTINATION bin) \ No newline at end of file diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp index f5adf9b24..74c809017 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) eoPop population(popsize, initializer); peoMoeoPopEval eval(byobj); - + // Only the master node read the initial trees and writes ouput files if(getNodeRank()==1) @@ -214,6 +214,7 @@ int main(int argc, char *argv[]) peo :: run(); peo :: finalize(); //algo(population); + } if (getNodeRank()==1) diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_archive.h b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_archive.h index 63fb70742..eb3ed542d 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_archive.h +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEO_archive.h @@ -45,6 +45,7 @@ class PhyloMOEOParetoSolutionsArchive:public moeoUnboundedArchive { create_file( filename ); if(title.size()>0) os << title << endl; + os.precision(10); for(int i=0; i -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 +* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2009 +* (C) OPAC Team, LIFL, 2002-2009 * -* Arnaud Liefooghe +* Arnaud Liefooghe, Waldo Cancino * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, @@ -40,7 +40,7 @@ #include #include -#include +#include /** @@ -49,7 +49,7 @@ * Tis strategy assigns diversity values FRONT BY FRONT. It is, for instance, used in NSGA-II. */ template < class MOEOT > -class moeoFrontByFrontCrowdingDiversityAssignment2 : public moeoCrowdingDiversityAssignment < MOEOT > +class moeoFrontByFrontCrowdingDiversityAssignment : public moeoCrowdingDiversityAssignment < MOEOT > { public: diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/parsimonycalculator.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/parsimonycalculator.cpp index bc591c087..71c095303 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/parsimonycalculator.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/parsimonycalculator.cpp @@ -243,6 +243,7 @@ int ParsimonyCalculator::node_parsimony( node a, node b, unsigned char *result) // calculate parsimony for taxon child, just union int sum_parsy = 0; int num_inf_sites = SeqData->infsite_count(); + #pragma parallel for for(int j=0; j< num_inf_sites; j++) sum_parsy += set_parsimony( &set_internal[a][j*5], &set_internal[b][j*5], &result[j*5]) * SeqData->infsite_count(j); return sum_parsy;