From f316e1dd354d98684db6404382d40fddbab4082b Mon Sep 17 00:00:00 2001 From: wcancino Date: Wed, 18 Mar 2009 09:25:02 +0000 Subject: [PATCH] OMP additions git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1559 331e1502-861f-0410-8da2-ba01fb791d7f --- contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp index a9bf2f5e3..f5adf9b24 100644 --- a/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp +++ b/contribution/branches/PhyloMOEA/PhyloMOEA/PhyloMOEA.cpp @@ -18,7 +18,7 @@ #include #include - +#include gsl_rng *rn2; RandomNr *rn; @@ -27,7 +27,7 @@ long seed; //vector arbores; string datafile,usertree, expid, path, algotype, optimize_branch; double pcrossover, pmutation, kappa, alpha; -unsigned int ngenerations, popsize, ncats; +unsigned int ngenerations, popsize, ncats, nthreads; ofstream exp_data,evolution_data, best_media_scores, final_trees, final_pareto_trees, clades_pareto, clades_final,final_scores,pareto_scores; LikelihoodCalculator *lik_calc_ptr; phylotreeIND *templatetree_ptr; @@ -62,7 +62,9 @@ int main(int argc, char *argv[]) ostringstream convert; convert << seed; expid = parser.createParam(convert.str(), "expid", "Experiment ID", 'e',"Param").value(); + nthreads = parser.createParam(omp_get_max_threads(), "nthreads", "Numthreads", 'i',"Param").value(); + omp_set_num_threads(nthreads); if(getNodeRank()==1) welcome_message(); if( datafile.size()==0 ) {