[vtk-developers] Multithreading with Win32 threads

David Partyka david.partyka at kitware.com
Tue Jan 25 16:26:03 EST 2011


Alright, it is now configurable and default to 64 (as I know you can buy
quad cpu opterons with 8 cores per CPU). If anyone needs more they can
increase it in cmake.

On Tue, Jan 25, 2011 at 2:43 PM, David Partyka <david.partyka at kitware.com>wrote:

> Humm, I like that idea better and that won't break anything. Thanks Dave!
>
>
> On Tue, Jan 25, 2011 at 2:41 PM, David Cole <david.cole at kitware.com>wrote:
>
>> I'm not going to object, but .... vtkMultiThreader contains *several*
>> arrays that are based on the value here. Do a quick sanity test of
>> creating a vtkMultiThreader object and inspecting its size. Just make
>> sure it's not ridiculously large.
>>
>> Perhaps adding a CMake value that can be tweaked to taste (and then
>> configured into vtkConfigure.h) with a default value of 32-ish would
>> be more reasonable.
>>
>>
>> On Tue, Jan 25, 2011 at 2:11 PM, David Partyka
>> <david.partyka at kitware.com> wrote:
>> > I am going to change it to 1024 unless someone objects for the immediate
>> > term. And then from there switch it to be dynamic and deprecate
>> > VTK_MAX_THREAD entirely.
>> >
>> > On Tue, Jan 25, 2011 at 8:27 AM, David Partyka <
>> david.partyka at kitware.com>
>> > wrote:
>> >>
>> >> I definitely agree but this looks like it should be given
>> >> a deprecation cycle as it involves removing API, there are set/get
>> macros
>> >> and VTK_MAX_THREAD is a const in a global header. Though, nearly all of
>> the
>> >> usage of VTK_MAX_THREAD is in vtkMultiThreader and it definitely would
>> not
>> >> be hard to switch it to dynamically store threads.
>> >> That said, I can check in a much larger value for VTK_MAX_THREAD right
>> >> now. How about 128? 256? 1024? INT_MAX?
>> >> After that, myself or someone else can switch it to use a vector
>> instead
>> >> of a fixed size array and then add the deprecation macros so people
>> know
>> >> it's going away. Does this sound reasonable? Or too cautious? :-p
>> >>
>> >> On Tue, Jan 25, 2011 at 8:04 AM, Will Schroeder
>> >> <will.schroeder at kitware.com> wrote:
>> >>>
>> >>> I agree with Ken, IMO we should remove hardcoded limits on threads. In
>> >>> fact I can see creating some specialized code to determine the
>> "optimal"
>> >>> number of threads (with provisions for manual override). After all in
>> the
>> >>> Nat'l Lab world that Ken/Sandia resides in, I've heard the dudes talk
>> about
>> >>> hundreds or thousands of processes, etc....it's evolving fast and we
>> don't
>> >>> want to have to keep changing this.
>> >>> W
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Jan 24, 2011 at 11:14 AM, Moreland, Kenneth <
>> kmorel at sandia.gov>
>> >>> wrote:
>> >>>>
>> >>>> Why is there a hardcoded maximum in the first place?  It seems to me
>> >>>> that whatever number you choose now will be excessively high and/or
>> obsolete
>> >>>> in the coming years as the number of cores per processor grows.
>> >>>>
>> >>>> -Ken
>> >>>>
>> >>>>
>> >>>> On 1/24/11 8:04 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>> >>>>
>> >>>> ITK has had the max set to 128 for quite a while.
>> >>>>
>> >>>> On Mon, Jan 24, 2011 at 9:53 AM, David Partyka
>> >>>> <david.partyka at kitware.com> wrote:
>> >>>> > Sure thing, especially considering one can get a machine with dual
>> >>>> > Hexa-cores + Hyper Threading resulting in 24 available cores.
>> >>>> >
>> >>>> > On Mon, Jan 24, 2011 at 9:39 AM, David Cole <
>> david.cole at kitware.com>
>> >>>> > wrote:
>> >>>> >>
>> >>>> >> I think it's just old and leftover, and nobody has yet found a
>> >>>> >> compelling
>> >>>> >> need for more than 8 threads on Windows. It should be fine to
>> >>>> >> increase this
>> >>>> >> number, especially if you actually have a Windows box with more
>> than
>> >>>> >> 8
>> >>>> >> processors on it.
>> >>>> >>
>> >>>> >> Feel free to change your build locally to increase that value.
>> >>>> >> Perhaps
>> >>>> >> somebody here on the VTK developers list is also contemplating
>> more
>> >>>> >> powerful
>> >>>> >> Window machines these days... Anybody here want to bump this up
>> and
>> >>>> >> commit
>> >>>> >> the change?
>> >>>> >>
>> >>>> >>
>> >>>> >> On Mon, Jan 24, 2011 at 5:11 AM, Pavel Pokutnev
>> >>>> >> <pavel.pokutnev at googlemail.com> wrote:
>> >>>> >>>
>> >>>> >>> Hello vtk-devs,
>> >>>> >>>
>> >>>> >>> sorry, but I would like to repeat my question.
>> >>>> >>> There is a define VTK_MAX_THREADS in
>> "Common/vtkSystemIncludes.h".
>> >>>> >>> It
>> >>>> >>> is defined to 8 for Win32 threads, but for all other platforms to
>> >>>> >>> 32.
>> >>>> >>> What is the cause for this non-conformity?
>> >>>> >>>
>> >>>> >>> Best regards,
>> >>>> >>> Pavel
>> >>>> >>> _______________________________________________
>> >>>> >>> Powered by www.kitware.com
>> >>>> >>>
>> >>>> >>> Visit other Kitware open-source projects at
>> >>>> >>> http://www.kitware.com/opensource/opensource.html
>> >>>> >>>
>> >>>> >>> Follow this link to subscribe/unsubscribe:
>> >>>> >>> http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>>> >>>
>> >>>> >>
>> >>>> >>
>> >>>> >> _______________________________________________
>> >>>> >> Powered by www.kitware.com
>> >>>> >>
>> >>>> >> Visit other Kitware open-source projects at
>> >>>> >> http://www.kitware.com/opensource/opensource.html
>> >>>> >>
>> >>>> >> Follow this link to subscribe/unsubscribe:
>> >>>> >> http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>>> >>
>> >>>> >>
>> >>>> >
>> >>>> >
>> >>>> > _______________________________________________
>> >>>> > Powered by www.kitware.com
>> >>>> >
>> >>>> > Visit other Kitware open-source projects at
>> >>>> > http://www.kitware.com/opensource/opensource.html
>> >>>> >
>> >>>> > Follow this link to subscribe/unsubscribe:
>> >>>> > http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> _______________________________________________
>> >>>> Powered by www.kitware.com
>> >>>>
>> >>>> Visit other Kitware open-source projects at
>> >>>> http://www.kitware.com/opensource/opensource.html
>> >>>>
>> >>>> Follow this link to subscribe/unsubscribe:
>> >>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>    ****      Kenneth Moreland
>> >>>>     ***      Sandia National Laboratories
>> >>>> ***********
>> >>>> *** *** ***  email: kmorel at sandia.gov
>> >>>> **  ***  **  phone: (505) 844-8919
>> >>>>     ***      web:   http://www.cs.unm.edu/~kmorel
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Powered by www.kitware.com
>> >>>>
>> >>>> Visit other Kitware open-source projects at
>> >>>> http://www.kitware.com/opensource/opensource.html
>> >>>>
>> >>>> Follow this link to subscribe/unsubscribe:
>> >>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> William J. Schroeder, PhD
>> >>> Kitware, Inc.
>> >>> 28 Corporate Drive
>> >>> Clifton Park, NY 12065
>> >>> will.schroeder at kitware.com
>> >>> http://www.kitware.com
>> >>> (518) 881-4902
>> >>
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtk-developers
>> >
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110125/eb622861/attachment.html>


More information about the vtk-developers mailing list