[ITK-dev] [ITK] Thread Pool patch

Brahmakshatriya, Umang (GE Global Research) brahmaks at ge.com
Mon Apr 7 09:27:47 EDT 2014


MultiThreader::MultiThreader() : m_ThreadPool(ThreadPool::New() )



187<javascript:void(0)>

{


188<javascript:void(0)>

  m_ThreadPool->InitializeThreads(GetGlobalDefaultNumberOfThreads() * 2);



I was aware of this issue and had mentioned about this to Jim - If we demand too many simumtaneous pthreads to be started, the pthread_create call returns error code 11 (http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html ). So if the above call returns the correct number of threads, I think we should be fine unless we are creating more than one "thread pools".

Umang Brahmakshatriya
Advanced Computing Lab
GE Global Research
1 Research Circle K1-3A37C
Niskayuna, NY 12309

From: Bradley Lowekamp [mailto:blowekamp at mail.nih.gov]
Sent: Monday, April 07, 2014 9:13 AM
To: Miller, James V (GE Global Research)
Cc: Brahmakshatriya, Umang (GE Global Research); insight-developers at itk.org
Subject: Re: [ITK-dev] [ITK] Thread Pool patch

Jim,


Yes it was. But I set ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS to 8, and did ctest -j 8 initially, then I scaled back from there with lack of complete success in testing. There are thread management issue with the current patch.

Brad

On Apr 4, 2014, at 2:06 PM, Miller, James V (GE Global Research) <millerjv at ge.com<mailto:millerjv at ge.com>> wrote:

"Too many threads" is a bit odd.  Umang does initialize the pool with a set of threads, then adds threads as needed. I believe the thread initialization is based on the number of cores.  But in principle, the initialization could be as low as 0 or 1 threads.

I missed that in the patch. This is what I saw:
m_Threadpool(m_Threadpoolfactory.GetSmartThreadPool(GetGlobalDefaul
tNumberOfThreads() * 2) )




185

{





Was this on one of your giant core machines?

Jim

Brad

On Apr 4, 2014, at 10:42 AM, Brahmakshatriya, Umang (GE Global Research) <brahmaks at ge.com<mailto:brahmaks at ge.com><mailto:brahmaks at ge.com>> wrote:

Hi All,

My name is Umang, I am working to submit the Thread Pool patch. Can anyone help me through the final steps of submitting it? I had a few issues creating the patches.
I am available next week at these times:
Tuesday 4/8 - 2.30p to 5p EST
Wednesday 4/9 -  9.30am to 12p EST
Thursday 4/10 - 2.30p to 5p EST

Let me know which time works best and I will setup a t-con and webex / google hangout.



Umang Brahmakshatriya
Advanced Computing Lab
GE Global Research
1 Research Circle K1-3A37C
Niskayuna, NY 12309

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com><http://www.kitware.com/>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers
_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org<mailto:Community at itk.org%3cmailto:Community at itk.org>>
http://public.kitware.com/cgi-bin/mailman/listinfo/community

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com<http://www.kitware.com%3chttp:/www.kitware.com>>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20140407/f621f96d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 43 bytes
Desc: image001.gif
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20140407/f621f96d/attachment.gif>


More information about the Insight-developers mailing list