Commit b41dc1fc authored by Robert McGibbon's avatar Robert McGibbon
Browse files

reset threadpool

parent 6a95f707
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. * * USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include <stdlib.h>
#include "openmm/internal/ThreadPool.h" #include "openmm/internal/ThreadPool.h"
#include "openmm/internal/hardware.h" #include "openmm/internal/hardware.h"
...@@ -62,15 +61,7 @@ static void* threadBody(void* args) { ...@@ -62,15 +61,7 @@ static void* threadBody(void* args) {
} }
ThreadPool::ThreadPool() { ThreadPool::ThreadPool() {
char* openmmNumThreads = getenv("OPENMM_NUM_THREADS");
char* end = openmmNumThreads;
if (openmmNumThreads != NULL) {
numThreads = strtol(openmmNumThreads, &end, 0);
}
if (openmmNumThreads == NULL || openmmNumThreads==end) {
numThreads = getNumProcessors(); numThreads = getNumProcessors();
}
pthread_cond_init(&startCondition, NULL); pthread_cond_init(&startCondition, NULL);
pthread_cond_init(&endCondition, NULL); pthread_cond_init(&endCondition, NULL);
pthread_mutex_init(&lock, NULL); pthread_mutex_init(&lock, NULL);
......
Markdown is supported
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