Commit f487ce18 authored by Tatuya Kamada's avatar Tatuya Kamada Committed by Sebastien Robin

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.
parent b016de78
......@@ -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()
......
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