Commit 2ee779a4 by Tatuya Kamada

runUnitTest: Set a sane default number of threads for numpy parallel primities

For example, testReceiptRecoginition employs numpy matrix calculation methods
that try to utilize all the CPU in the computer. This behavior is harmlfull
when there are several testReciptRecongnition is running in a testnode which
has 40 CPUs.
1 parent 387cabc2
......@@ -488,6 +488,9 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
instance_home = os.environ['INSTANCE_HOME']
os.environ.setdefault('EVENT_LOG_FILE', os.path.join(tests_home, 'zLOG.log'))
os.environ.setdefault('EVENT_LOG_SEVERITY', '-300')
# For numpy parallel-primitives such as numpy.dot() that is used in
# testReceiptRecognition for example.
os.environ.setdefault('OMP_NUM_THREADS', '3')
_print("Loading Zope ... \n")
_start = time.time()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!