Commit 25c70bf7 authored by omid's avatar omid
Browse files

more correction on initial num of threads

parent 26be0e27
...@@ -85,7 +85,7 @@ int main(int aRgc, char **aRgv) { ...@@ -85,7 +85,7 @@ int main(int aRgc, char **aRgv) {
// Adjust and report the number of threads that will be used // Adjust and report the number of threads that will be used
#ifdef _OPENMP #ifdef _OPENMP
int num_threads = omp_get_max_threads(); int num_threads = omp_get_max_threads();
// std::cout<<"max num of thr: "<< num_threads <<std::endl; std::cout<<"max num of thr: "<< num_threads <<std::endl;
if ((cmd.mNumThreads >= 1) && if ((cmd.mNumThreads >= 1) &&
(cmd.mNumThreads <= (unsigned int)num_threads)) (cmd.mNumThreads <= (unsigned int)num_threads))
...@@ -95,6 +95,7 @@ int main(int aRgc, char **aRgv) { ...@@ -95,6 +95,7 @@ int main(int aRgc, char **aRgv) {
// std::cout<<"num of thr: "<< num_threads <<std::endl; // std::cout<<"num of thr: "<< num_threads <<std::endl;
omp_set_num_threads(num_threads); omp_set_num_threads(num_threads);
std::cout<<"current num of thr: "<< num_threads <<std::endl;
/*if (num_threads < 2) /*if (num_threads < 2)
cmd.mForceSerial = true; cmd.mForceSerial = true;
else else
...@@ -210,8 +211,8 @@ int main(int aRgc, char **aRgv) { ...@@ -210,8 +211,8 @@ int main(int aRgc, char **aRgv) {
std::cout << "Branch lengths are fixed" << std::endl; std::cout << "Branch lengths are fixed" << std::endl;
#ifdef _OPENMP #ifdef _OPENMP
if (num_threads > 1) { if (num_threads > 1) {
std::cout << "Num. threads: " << num_threads << std::endl std::cout << "Current num. threads: " << num_threads << std::endl
<< "Num. cores: " << omp_get_num_procs() << std::endl; << "Total num. cores: " << omp_get_num_procs() << std::endl;
} else } else
#endif #endif
{ {
...@@ -677,10 +678,10 @@ int main(int aRgc, char **aRgv) { ...@@ -677,10 +678,10 @@ int main(int aRgc, char **aRgv) {
if (cmd.mVerboseLevel >= VERBOSE_ONLY_RESULTS) { if (cmd.mVerboseLevel >= VERBOSE_ONLY_RESULTS) {
if (cmd.mBranchAll) if (cmd.mBranchAll)
std::cout << std::endl << "Doing all foreground branches" std::cout << std::endl << "Doing for all branches (internal + leaf) as foreground"
<< std::endl; << std::endl;
else else
std::cout << std::endl << "Doing internal foreground branches" std::cout << std::endl << "Doing for all internal branches as foreground"
<< std::endl; << std::endl;
std::cout << "------------------------------------" << std::endl; std::cout << "------------------------------------" << std::endl;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment