Skip to content
Permalink
Browse files

Add variable to support thread control

  • Loading branch information...
martin-steinegger committed Apr 15, 2019
1 parent 6c3dc08 commit e07eeb02e77fbb7b36f47a11704bc2a3af1a7703
Showing with 11 additions and 5 deletions.
  1. +11 −5 src/commons/Parameters.cpp
@@ -1494,12 +1494,18 @@ void Parameters::setDefaults() {
threads = 1;
compressed = WRITER_ASCII_MODE;
#ifdef OPENMP
#ifdef _SC_NPROCESSORS_ONLN
threads = sysconf(_SC_NPROCESSORS_ONLN);
#endif
if(threads <= 1){
threads = Util::omp_thread_count();
char * threadEnv = getenv("MMSEQS_NUM_THREADS");
if (threadEnv != NULL) {
threads = (int) Util::fast_atoi<unsigned int>(threadEnv);
} else {
#ifdef _SC_NPROCESSORS_ONLN
threads = sysconf(_SC_NPROCESSORS_ONLN);
#endif
if(threads <= 1){
threads = Util::omp_thread_count();
}
}

#endif
compBiasCorrection = 1;
diagonalScoring = 1;

0 comments on commit e07eeb0

Please sign in to comment.
You can’t perform that action at this time.