[Insight-users] about multithreading in ITK
Andriy Fedorov
fedorov at bwh.harvard.edu
Thu Jan 22 12:12:33 EST 2009
Kaveh,
You can look at PETSc for parallel linear algebra routines:
http://www.mcs.anl.gov/petsc/petsc-as/.
In the past I used PETSc in conjunction with ITK code. You have to be
careful to make sure that both PETSc and ITK are compiled with the
same mpicc/mpicxx/mpiCC compiler.
Hope this helps
Andriy Fedorov
> Date: Wed, 21 Jan 2009 09:01:08 -0800 (PST)
> From: Kaveh Kohan <kaveh.kohan at yahoo.com>
> Subject: [Insight-users] about multithreading in ITK
> To: insight-users at itk.org
> Message-ID: <352748.10256.qm at web59915.mail.ac4.yahoo.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello All,
>
> I have a general question about multi-threading in ITK and I would be thankful if anybody
> answer:
>
> As far as I know, ITK uses vnl for linear albera operation but it is not
> multithreaded (Please correct me if I am wrong). While many complicated
> algorithm are already multithreaded in ITK, was there any technical reason that
> linear algebra operation (like matrix-matrix multiplication, solving linear
> system, LU, ....) is not multithreaded? Perhaps it didn't have priority.
>
> I would be appreciated if you tell what is the best way to implement efficient,
> multithread linear algebra operation. In case it is not a good idea to use ITK
> API for multithreading of such operation, is there any third party multithreaded
> libray for linear algebra operation that I can link to ITK.
>
>
> Regards,
> Kaveh
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20090121/d3f2d3b5/attachment-0001.htm>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 21 Jan 2009 05:08:20 -0600
> From: Oleksandr Dzyubak <adzyubak at gmail.com>
> Subject: Re: [Insight-users] ITK 3.10.1 Packages for Ubuntu 8.04 and
> 8.10
> To: Mathieu Malaterre <mathieu.malaterre at gmail.com>
> Cc: insight-users at itk.org
> Message-ID: <49770224.3020103 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Mathieu,
>
> Just couple notes.
>
> 1) Ubuntu is not Debian even though it is based on Debian.
>
> 2) As you remember, Debian has three levels: Stable, Testing, Unstable.
>
> 3) The stable branch is only recommended for production.
>
> 4) At this moment, the stable version is Debian-Etch which does not
> include the Insight Toolkit. For this reason, those of us who
> have stations with Etch should compile ITK ourselves.
>
> 5) The next, testing version Debian-Lenny, includes Insight Toolkit 3.6
> which is good but a bit outdated for some applications so if you cannot
> tolerate
> ITK-3.6, you have to compile 3.10 yourself.
>
> 6) Unstable version Debian-Sid includes Insight Toolkit 3.10
> on its "packaging list" but it is highly not recommended to use
> on production stations.
> ....Unless "you know what you are doing...."
>
> Alex
>
>
> Mathieu Malaterre wrote:
>> On Tue, Jan 20, 2009 at 7:33 PM, Paul Novotny <paul.novotny at gmail.com> wrote:
>>
>>> I have updated the ITK packages for Ubuntu Intrepid Ibex (8.10) and
>>> Hardy Heron (8.04) in my repository. This release includes the latest
>>> ITK (3.10.1) and WrapITK packages for Python. If you previously
>>> installed ITK 3.8 from my repository, Ubuntu should update
>>> automatically. Instructions for installing the packages for the first
>>> time are on my website:
>>>
>>
>> How different is it from the official debian-med ?
>>
>> http://www.debian.org/devel/debian-med/
>>
>> Ref:
>> http://debian-med.alioth.debian.org/cgi-bin/qareport.cgi
>>
>> Looks like 3.10 patch 1 is in.
>>
>> thanks,
>>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 21 Jan 2009 20:46:36 -0600 (CST)
> From: David Fuentes <fuentesdt at gmail.com>
> Subject: [Insight-users] mpi and itk
> To: insight-users at itk.org
> Message-ID:
> <alpine.DEB.2.00.0901212040530.10934 at setebos.ices.utexas.edu>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>
>
> has anyone experimented with parallelizing ITK image data
> structures via MPI? How did you go about it?
>
> I'm thinking of partitioning the image with
> RegionOfInterestImageFilter so that each processor
> can own a subdomain of the image to process?
>
>
> not sure how to handle ghost element/pixels however...
>
>
>
> thanks,
> df
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 22 Jan 2009 07:40:40 -0500
> From: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Subject: Re: [Insight-users] mpi and itk
> To: insight-users at itk.org
> Cc: David Fuentes <fuentesdt at gmail.com>
> Message-ID: <200901220740.45278.hobbsk at ohiou.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Wednesday 21 January 2009 21:46:36 David Fuentes wrote:
>> has anyone experimented with parallelizing ITK image data
>> structures via MPI? How did you go about it?
>>
>
> Yes, I've tried some very simple steps. I split image regions. I've pasted
> pieces together, and sent pieces to other nodes. I posted what I did to the
> list but I can't remember when.
>
>> I'm thinking of partitioning the image with
>> RegionOfInterestImageFilter so that each processor
>> can own a subdomain of the image to process?
>>
>
> I used a modified image region splitter, ExtractImageFilter, and
> PasteImageFilter, but the same idea.
>
>>
>> not sure how to handle ghost element/pixels however...
>>
>
> With image regions it's easy enough to just add or subtract the number of
> border pixels to the region. What happens next I suppose depends on the
> algorithm.
>
> What task are you trying to do?
>
> I've been dreaming about an MPI fast marching image filter.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 197 bytes
> Desc: This is a digitally signed message part.
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20090122/ae8eb184/attachment-0001.pgp>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 22 Jan 2009 10:38:10 -0500
> From: Michael Jackson <mike.jackson at bluequartz.net>
> Subject: [Insight-users] Multi-Threaded Registration
> To: insight-users at itk.org
> Message-ID: <A79F4C52-8D56-4472-BB21-2C886190E833 at bluequartz.net>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> I noticed the method SetNumberOfThreads(int); in the
> RegistrationMethod class. I set this to "2" (I have a Dual Core
> machine) but when I run my registration code I am not seeing both
> CPU's utilized, I just get 1 CPU fully utilized. Are there only
> specific Registration Methods that are multi-threaded or am I mis-
> interpreting what this method is supposed to do.
>
> Thanks
> _________________________________________________________
> Mike Jackson mike.jackson at bluequartz.net
> BlueQuartz Software www.bluequartz.net
> Principal Software Engineer Dayton, Ohio
>
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 22 Jan 2009 10:45:41 -0500
> From: Karthik Krishnan <karthik.krishnan at kitware.com>
> Subject: Re: [Insight-users] Multi-Threaded Registration
> To: Michael Jackson <mike.jackson at bluequartz.net>
> Cc: insight-users at itk.org
> Message-ID:
> <9ddb27260901220745q42dbca28pf6b066eb6131f3fc at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Thu, Jan 22, 2009 at 10:38 AM, Michael Jackson <
> mike.jackson at bluequartz.net> wrote:
>
>> I noticed the method SetNumberOfThreads(int); in the RegistrationMethod
>> class. I set this to "2" (I have a Dual Core machine) but when I run my
>> registration code I am not seeing both CPU's utilized, I just get 1 CPU
>> fully utilized. Are there only specific Registration Methods that are
>> multi-threaded or am I mis-interpreting what this method is supposed to do.
>
>
> Yes.
>
> The components of the registration methods are :
>
> - Metric
> - Optimizer
> - Transform
> - Resampling stage
>
> Some (not all) of the metrics are multi-threaded. These are the Mattes MI,
> Mean Squares and Match Cardinality image metrics. You need to turn on the
> ITK_USE_OPTIMIZED_REGISTRATION_METHODS flag.
>
> The resampling (to resample the moving image using the transform onto the
> fixed image) is multithreaded.
>
>
> --
> Karthik Krishnan
> R&D Engineer,
> Kitware Inc.
> Ph: 518 371 3971 x119
> Fax: 518 371 3971
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.itk.org/pipermail/insight-users/attachments/20090122/08f0b159/attachment-0001.htm>
>
> ------------------------------
>
> Message: 7
> Date: Thu, 22 Jan 2009 09:51:16 -0600 (CST)
> From: David Fuentes <fuentesdt at gmail.com>
> Subject: Re: [Insight-users] mpi and itk
> To: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Cc: insight-users at itk.org
> Message-ID: <alpine.DEB.1.00.0901220936510.10435 at WKAN>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>
> Kevin,
>
> many thanks for the reply, I'll look into the filters you mentioned and
> dig up your old post.
>
>
> I have an image processing algorithm that is pixel wise computationally
> expensive and I want to break it up on several processes.
> For transferring data back and forth I what to use Petsc's
> structured grid infrastructure.
> Do you know if RegionOfInterestImageFilter, ExtractImageFilter,
> PasteImageFilter, etc...
> copy the associated section of the pixel buffer of the full image into its
> own local buffer? For example when doing an MPI send of a pixel buffer
> associated with ExtractImageFilter are you sending the data from
> the full image buffer and thus have to declare special MPI_Datatypes,
> etc... to MPI_Send with an offset?
>
>
>
>
> df
>
>
>
> On Thu, 22 Jan 2009, Kevin H. Hobbs wrote:
>
>> On Wednesday 21 January 2009 21:46:36 David Fuentes wrote:
>>> has anyone experimented with parallelizing ITK image data
>>> structures via MPI? How did you go about it?
>>>
>>
>> Yes, I've tried some very simple steps. I split image regions. I've pasted
>> pieces together, and sent pieces to other nodes. I posted what I did to the
>> list but I can't remember when.
>>
>>> I'm thinking of partitioning the image with
>>> RegionOfInterestImageFilter so that each processor
>>> can own a subdomain of the image to process?
>>>
>>
>> I used a modified image region splitter, ExtractImageFilter, and
>> PasteImageFilter, but the same idea.
>>
>>>
>>> not sure how to handle ghost element/pixels however...
>>>
>>
>> With image regions it's easy enough to just add or subtract the number of
>> border pixels to the region. What happens next I suppose depends on the
>> algorithm.
>>
>> What task are you trying to do?
>>
>> I've been dreaming about an MPI fast marching image filter.
>>
>
>
> ------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> End of Insight-users Digest, Vol 57, Issue 44
> *********************************************
>
More information about the Insight-users
mailing list