[Insight-users] Update: Re: about multithreading in ITK (Michael Jackson)

Kaveh Kohan kaveh.kohan at yahoo.com
Fri Jan 23 15:16:38 EST 2009


Thank you Mike,

Actually you answered me on the other forum (CMake forum). I am sorry it was my silly mistake. I should have set -fopenmp for CMAKE_C_FLAGS and CMAKE_CXX_FLAGS because it is a compiler flag! Thank you very much for the hint.

The remaining question is:
ITK uses LAPACK and LAPACK is multithreaded (correct me if I am wrong).
If yes how can I set number of threads for matrix multiplication?  Is there any method like SetNumberofThreads() for linear algebra part of ITK?

Actually I check subject you mentioned in your email. I don't think it applies here, because it seems that in ITK, some filters are multi-threaded (some registeration, some segmentation methods, etc) but operations like matrix multiplication are not filters. I check doxygen, ITK has itk::MultiThreader class. It seems that it is a general purposes classs for multithreading. I just find cool presentation on na-mic.org:

http://www.na-mic.org/Wiki/images/2/24/Insight-MultiThreading.ppt

But I am wondering is there any more example how to use. I may try to implement simple matrix-matrix and post it online for illustration purpose but there is still reservation in the term of efficency. I though that perhaps this kind of stuff is already implemented. Please let me know if it is. 

Regards,
Kaveh




   1. Re: about multithreading in ITK (Andriy Fedorov) (Michael Jackson)

You may want to look at a recent question asked by me on this list.  
Look for the subject "Re: [Insight-users] Multi-Threaded  
Registration". in there are some suggestions on getting some aspects  
of Multi-Threading to work.

Also, I had those same openmp examples working with CMake so I know it  
will work.

If you are compiling on the command line try "make VERBOSE=1" and  
inspect the full compiler command to make sure your flags are making  
it through.

---
Mike Jackson                www.bluequartz.net


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090123/7007c51e/attachment.htm>


More information about the Insight-users mailing list