|Anonymous | Login | Signup for a new account||2017-09-26 04:08 CEST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000215||ILNumerics||[All Projects] Bugs||public||2015-01-22 18:30||2015-01-22 19:35|
|Summary||0000215: Problem with multithreaded managed matrix multiply on certain matrices (large vectors)|
|Description||On certain machines (with a certain, uneven?) number of true processor cores, certain matrices seem do give wrong results when used with ILMath.multiply(). |
The problem ocours only occasionally. This may lead to a bug in ManMatMult (multithreaded version).
Workaround: Use MKL instead. Somewhere at the beginning of your code, write:
Settings.ManagedMultiplyMaxElementSize = 1;
|Steps To Reproduce||* Test on a machine with at least 6 cores.|
* set the number of threads to be used explicitly: Settings.MaxNumberThreads = 3
Settings.MaxNumberThreads = 3;
ILArray<double> B = ILMath.counter(50, 1);
ILArray<double> R1 = ILMath.multiply(B, B.T);
* May need to re-run several times until R1 does not show the expected image.
The problem shows up clearly in ILNumerics Array Visualizer: use ImageSC output tab. See picture attached.
|Tags||No tags attached.|
|Attached Files|| Array Visualizer Compare Matrices Visually.png [^] (61,070 bytes) 2015-01-22 18:30
Will be fixed in 4.7.
The reason was a wrong handling of temporary packing buffers in a multithreading context. The parallelized version has been disabled for now. We should decide if it pays off to parallelize at all here, since we delegate multiply() to the MKL for all reasonable large matrices anyway.
If parallelizing: must create copies of CArr, APack, BPack for each thread and merge-add CArr after all threads have finished. (Again: measure in advance, if the overhead pays off!)
|2015-01-22 18:30||ho||New Issue|
|2015-01-22 18:30||ho||Status||new => assigned|
|2015-01-22 18:30||ho||Assigned To||=> ho|
|2015-01-22 18:30||ho||File Added: Array Visualizer Compare Matrices Visually.png|
|2015-01-22 19:35||ho||Note Added: 0000211|
|2015-01-22 19:35||ho||Status||assigned => resolved|
|2015-01-22 19:35||ho||Resolution||open => fixed|
|Copyright © 2000 - 2011 MantisBT Group|