[Insight-users] Re sampleImageFilter and multithreading.

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 21 12:48:43 EDT 2009


Hi Pete79,

Thanks for letting us know that you found the root of the problem.

On retrospective,
check for uninitialized variables may have helped to find this faster....


About your second question:

     We will need to know more about your processes....
     Are they running only the resampling of the image ?
     or do they have other components ?


I would suggest that you start by just running one of the
ITK Resampling examples with a large image and check
that the 8 cores are being used (they should).

You will find many examples of Resampling in the
directory:

           Insight/Examples/Filtering/

ResampleImageFilter2.cxx
ResampleImageFilter3.cxx
ResampleImageFilter4.cxx
ResampleImageFilter5.cxx
ResampleImageFilter6.cxx
ResampleImageFilter7.cxx
ResampleImageFilter8.cxx
ResampleImageFilter9.cxx
ResampleImageFilter.cxx
ResampleOrientedImageFilter.cxx
ResampleVolumesToBeIsotropic.cxx



    Please let us know what you observe
    when you run that experiment.


            Thanks


                   Luis


----------------------------------------------------------------------
On Sun, Oct 18, 2009 at 6:18 PM, Pete79 <pkoniusz at hotmail.com> wrote:
>
>
> Pete79 wrote:
>>
>> I'm running multiple threads which launch a subroutine which consists of
>> the following:
>>
>
> Dear all. Shame to admit, though the chief issue was caused by my own
> mistake. When setting up parameters of the affine transform, I set up only
> firs 4 out of 6 matrix values which correspond to 2x2 covariance matrix.
> Nonetheless, there are two more coefficient which correspond to shift. They
> ended up initialised with random values (possibly large ones) - this kept
> causing crashes and other odd behaviour. Now, I don't even limit number of
> threads by SetNumberOfThreads per resampler and it works fine.
>
> The only thing is I haven't got expected boost in processing time. When I
> run two separate processes of the code, it seems often utilise only few
> percent of the 8 cores I've got. At scarce peaks it gets 30%. I expected it
> to reach 80/90 percent easily, especially that two independent processes run
> bunch of threads simultaneously .... Any thoughts on this?
>
> Many thanks!
> --
> View this message in context: http://www.nabble.com/ResampleImageFilter-and-multithreading.-tp25942385p25951068.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> 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-users
>


More information about the Insight-users mailing list