
numexpr - issue #97
only one core used when operating on arrays returned by np.ogrid
What steps will reproduce the problem? 1. import numpy as np; import numexpr as ne; import timeit 2. a, b = np.ogrid[0:1:0.0001, 0:1:0.0001] 3. timeit.repeat(stmt = 'ne.evaluate("(a**5) + b**2 + 2*a*b")', setup='import numexpr as ne; import numpy as np; from main import a, b', repeat = 5, number = 1)
What is the expected output? What do you see instead? Here are two cores in my PC, expected: both cores are used to do calculation what I meet is: only one core are used to calculate
What version of the product are you using? On what operating system? >>> ne.print_versions() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Numexpr version: 1.4.2 NumPy version: 1.6.2 Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] AMD/Intel CPU? True VML available? False Detected cores: 2
Please provide any additional information below. two cores are used when working on likely arrays
Comment #1
Posted on Feb 11, 2013 by Swift Monkeysorry for misleading, I just tried on the latest release, this has been fixed.
ne.print_versions() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Numexpr version: 2.0.1 NumPy version: 1.6.2 Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] AMD/Intel CPU? True VML available? False Detected cores: 2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Single Core: [11.958847004298036, 11.906129130937032, 11.902080292327653, 11.891899668812655, 12.075420479418483] Dual Core: [7.506093930932565, 7.446685263071146, 7.184206651962739, 7.065780986130903, 7.2817894453066]
overhead seems high? (7.5 - 6.0)/6.0 * 100% = 25%
Comment #2
Posted on Apr 12, 2013 by Swift Dog(No comment was entered for this change.)
Status: Fixed
Labels:
Type-Defect
Priority-Medium