MantisBT - ITK
View Issue Details
0008357ITKpublic2009-01-08 12:432009-03-03 09:55
Hans Johnson 
Luis Ibanez 
immediatemajoralways
closedfixed 
ITK-3-10 
ITK-3-12 
0008357: itkMultiThreader does not respect GlobalMaximumNumberOfThreads to limit number of threads
The expected behavior of setting GlobalMaximumNumberOfThreads is that the number of threads used can not exceed that value.

This was not consistently implemented, and when GlobalMaximumNumberOfThreads was set to less than the number of procesors on the running system, the GlobalDefaultNumberOfThreads would equal the number of processors rather than clamping it to the GlobalMaximumNumberOfThreads.

Additionally, it was possible to set the GlobalMaximumNumberOfThreads to a negative number or to numbers greater than ITK_MAX_THREADS.


A code review was performed by Karthik Krishnan, Luis Ibanez, and Hans Johnson at the NA-MIC January 2009 AHM.

The test suite was run with the modified code, and all expected test passed (i.e. the 5 failing tests were verified to be due to reasons other than the threading changes). This was tested on 8 processor and 2 processor Macintosh, and 2 procesor linux computer.

No tags attached.
Issue History
2009-01-08 12:43Hans JohnsonNew Issue
2009-01-09 03:59Luis IbanezNote Added: 0014495
2009-01-09 04:01Luis IbanezNote Added: 0014496
2009-01-09 04:02Luis IbanezNote Added: 0014497
2009-01-09 04:02Luis IbanezStatusnew => resolved
2009-01-09 04:02Luis IbanezResolutionopen => fixed
2009-01-09 04:02Luis IbanezAssigned To => Luis Ibanez
2009-03-03 09:55Hans JohnsonNote Added: 0015511
2009-03-03 09:55Hans JohnsonStatusresolved => closed
2009-03-03 09:55Hans JohnsonFixed in Version => ITK-3-12

Notes
(0014495)
Luis Ibanez   
2009-01-09 03:59   
A fix was committed to the main trunk

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMultiThreader.cxx?root=Insight&r1=1.44&r2=1.45 [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMultiThreader.h?root=Insight&r1=1.28&r2=1.29 [^]
(0014496)
Luis Ibanez   
2009-01-09 04:01   
A fix was committed to the ITK-3-10 branch.

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMultiThreader.h?r1=1.28&r2=1.28.22.1&pathrev=ITK-3-10&sortby=date&root=Insight [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMultiThreader.cxx?r1=1.44&r2=1.44.4.1&pathrev=ITK-3-10&sortby=date&root=Insight [^]
(0014497)
Luis Ibanez   
2009-01-09 04:02   
Test are passing in experimental builds.

We will wait to see a clean set of Nightly builds before closing this bug.
(0015511)
Hans Johnson   
2009-03-03 09:55   
This fix was implemented in Januray 2009 at the NAMIC all hands meeting. A month of testing indicates that it is working properly.