From matt.mccormick at kitware.com Wed Mar 4 22:44:28 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Mar 2015 22:44:28 -0500 Subject: [ITK-dev] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/covpn37cs306pbu11gl42gdlo5c On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/cnbf68nke70rp5ttt6plcp232n0 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From matt.mccormick at kitware.com Mon Mar 9 14:05:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 9 Mar 2015 14:05:09 -0400 Subject: [ITK-dev] New Ubuntu 14.04 Python Wrapping Nightly Message-ID: Hi, Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: https://open.cdash.org/buildSummary.php?buildid=3723919 and it is in the All Green Club! Hurrah! Matt From michkapopoff at gmail.com Mon Mar 9 16:29:19 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Mon, 9 Mar 2015 21:29:19 +0100 Subject: [ITK-dev] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: References: Message-ID: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> Thanks for the addition of the 14.04 build system. Wrappings have never been so green :) Michka > On 09 Mar 2015, at 19:05, Matt McCormick wrote: > > Hi, > > Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: > > https://open.cdash.org/buildSummary.php?buildid=3723919 > > and it is in the All Green Club! Hurrah! > > Matt > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Mon Mar 9 16:36:05 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 9 Mar 2015 16:36:05 -0400 Subject: [ITK-dev] [ITK] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> References: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> Message-ID: <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> I just changed min6 to use CMAKE_OSX_DEPLOYMENT_TARGET:PATH=10.8, so that should avoid the libc++ issue with levelsets and green it up a bit more. Like the spring season :) Brad On Mar 9, 2015, at 4:29 PM, wrote: > Thanks for the addition of the 14.04 build system. > Wrappings have never been so green :) > > Michka > >> On 09 Mar 2015, at 19:05, Matt McCormick wrote: >> >> Hi, >> >> Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: >> >> https://open.cdash.org/buildSummary.php?buildid=3723919 >> >> and it is in the All Green Club! Hurrah! >> >> Matt >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Mon Mar 9 16:41:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 9 Mar 2015 16:41:09 -0400 Subject: [ITK-dev] [ITK] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> References: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> Message-ID: Excellent! Thanks! I looked into the levelsets failures on dash5 after "upgrading" to the latest XCode. It looks like I am going to have to learn how to get lldb working, since gdb is not available :-Z. Also, I found a backup image for dash5win7x64.kitware, so that system should be reporting again, soon. Matt On Mon, Mar 9, 2015 at 4:36 PM, Bradley Lowekamp wrote: > I just changed min6 to use CMAKE_OSX_DEPLOYMENT_TARGET:PATH=10.8, so that should avoid the libc++ issue with levelsets and green it up a bit more. Like the spring season :) > > Brad > > On Mar 9, 2015, at 4:29 PM, wrote: > >> Thanks for the addition of the 14.04 build system. >> Wrappings have never been so green :) >> >> Michka >> >>> On 09 Mar 2015, at 19:05, Matt McCormick wrote: >>> >>> Hi, >>> >>> Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: >>> >>> https://open.cdash.org/buildSummary.php?buildid=3723919 >>> >>> and it is in the All Green Club! Hurrah! >>> >>> Matt >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > From jian.cheng.1983 at gmail.com Wed Mar 11 16:07:03 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Wed, 11 Mar 2015 16:07:03 -0400 Subject: [ITK-dev] efficiency of vnl_matrix Message-ID: <5500A067.5080507@gmail.com> Hi, My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. Thus the performance is actually mainly determined by the matrix library I used. Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very inefficient because vnl matrix lib does not use blas and lapack. After I wrote my own matrix class which uses openblas and lapack, I got a hug gain of performance. I found there is a proposal to improve the efficiency of numerical libraries in ITK. http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries I am not sure how is the progress of the proposal. I wonder when the vnl matrix lib can internally support blas and lapack, or mkl, so that we can just use it without lose of the efficiency. Thanks. best, Jian Cheng From matt.mccormick at kitware.com Wed Mar 11 16:39:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 11 Mar 2015 16:39:51 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500A067.5080507@gmail.com> References: <5500A067.5080507@gmail.com> Message-ID: Hi Jian, Yes, it would be wonderful to improve the efficiency of these basic numerical operations. Funding for the Refactor Numerical Libraries has currently ended, and the effort is currently frozen. However, you are more than welcome to pick it up and we can help you get it into ITK. More information on the patch submission process can be found here [1] and in the ITK Software Guide. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: > Hi, > > My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. > Thus the performance is actually mainly determined by the matrix library > I used. > Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very > inefficient because vnl matrix lib does not use blas and lapack. > After I wrote my own matrix class which uses openblas and lapack, I got > a hug gain of performance. > > I found there is a proposal to improve the efficiency of numerical > libraries in ITK. > http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries > I am not sure how is the progress of the proposal. > I wonder when the vnl matrix lib can internally support blas and lapack, > or mkl, so that we can just use it without lose of the efficiency. > Thanks. > > best, > Jian Cheng > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From jian.cheng.1983 at gmail.com Wed Mar 11 18:17:00 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Wed, 11 Mar 2015 18:17:00 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> Message-ID: <5500BEDC.40203@gmail.com> Hi Matt, Thanks for your help, and also for the ITK workshop in UNC last time. It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. With your help and discussion, I will be very glad to make my first patch to ITK. Thanks. best, Jian Cheng On 03/11/2015 04:39 PM, Matt McCormick wrote: > Hi Jian, > > Yes, it would be wonderful to improve the efficiency of these basic > numerical operations. > > Funding for the Refactor Numerical Libraries has currently ended, and > the effort is currently frozen. However, you are more than welcome to > pick it up and we can help you get it into ITK. More information on > the patch submission process can be found here [1] and in the ITK > Software Guide. > > Thanks, > Matt > > [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html > > On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >> Hi, >> >> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >> Thus the performance is actually mainly determined by the matrix library >> I used. >> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very >> inefficient because vnl matrix lib does not use blas and lapack. >> After I wrote my own matrix class which uses openblas and lapack, I got >> a hug gain of performance. >> >> I found there is a proposal to improve the efficiency of numerical >> libraries in ITK. >> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> I am not sure how is the progress of the proposal. >> I wonder when the vnl matrix lib can internally support blas and lapack, >> or mkl, so that we can just use it without lose of the efficiency. >> Thanks. >> >> best, >> Jian Cheng >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From M.Staring at lumc.nl Thu Mar 12 05:15:14 2015 From: M.Staring at lumc.nl (M.Staring at lumc.nl) Date: Thu, 12 Mar 2015 09:15:14 +0000 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500BEDC.40203@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> Message-ID: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Hi, I think the eigen library is a mature and very fast library for these kind of things: http://eigen.tuxfamily.org/index.php?title=Main_Page You may want to check it out, to see if it offers what you need. It would be great to be able to use these within the itk. 2c Marius -----Original Message----- From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng Sent: Wednesday, March 11, 2015 23:17 To: Matt McCormick Cc: Chuck Atkins; ITK Subject: Re: [ITK-dev] efficiency of vnl_matrix Hi Matt, Thanks for your help, and also for the ITK workshop in UNC last time. It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. With your help and discussion, I will be very glad to make my first patch to ITK. Thanks. best, Jian Cheng On 03/11/2015 04:39 PM, Matt McCormick wrote: > Hi Jian, > > Yes, it would be wonderful to improve the efficiency of these basic > numerical operations. > > Funding for the Refactor Numerical Libraries has currently ended, and > the effort is currently frozen. However, you are more than welcome to > pick it up and we can help you get it into ITK. More information on > the patch submission process can be found here [1] and in the ITK > Software Guide. > > Thanks, > Matt > > [1] > https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo > ftwareProcess/SubmitAPatchToGerrit/index.html > > On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >> Hi, >> >> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >> Thus the performance is actually mainly determined by the matrix >> library I used. >> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >> very inefficient because vnl matrix lib does not use blas and lapack. >> After I wrote my own matrix class which uses openblas and lapack, I >> got a hug gain of performance. >> >> I found there is a proposal to improve the efficiency of numerical >> libraries in ITK. >> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> I am not sure how is the progress of the proposal. >> I wonder when the vnl matrix lib can internally support blas and >> lapack, or mkl, so that we can just use it without lose of the efficiency. >> Thanks. >> >> best, >> Jian Cheng >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Thu Mar 12 08:32:18 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 12 Mar 2015 08:32:18 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Message-ID: <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> Hello, If I was writing my own ITK classes, and needed a fast matrix library I would likely pursue an additional dependency on an efficient numeric library for that project, such as eigen. However for the broad appeal of ITK I would think a flexible back end would be best. As I think there are a variety of BLAS and LAPACK libraries available ( commercial, open source, vender free ). It would be nice to pick one what has been optimized for the current architecture. I would think it would be most flexible to use this interface in the back end of a chosen numeric interface ( currently VNL ). Unfortunately, I don't have as much experience with these libraries as I'd like. Brad On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: > Hi, > > I think the eigen library is a mature and very fast library for these kind of things: > http://eigen.tuxfamily.org/index.php?title=Main_Page > > You may want to check it out, to see if it offers what you need. > > It would be great to be able to use these within the itk. > > 2c > Marius > > -----Original Message----- > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > Sent: Wednesday, March 11, 2015 23:17 > To: Matt McCormick > Cc: Chuck Atkins; ITK > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix >>> library I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>> very inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I >>> got a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and >>> lapack, or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From jian.cheng.1983 at gmail.com Thu Mar 12 10:01:47 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 10:01:47 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Message-ID: <55019C4B.6050502@gmail.com> Hi, I did test some mature matrix libs. Compared to eigen, I prefer armadillo http://arma.sourceforge.net/, because armadillo is more efficient for my task based on my experiments. Someone wrote did a numerical comparison on pseudo-inverse. http://nghiaho.com/?p=1726 Thus for picking a mature library, I vote for armadillo. I decided to write my own matrix class for the codes, because it does not need to add additional dependency and it just contains 2-3 header files for a light-wright matrix lib to support blas, lapack, mkl, and expression template. best, Jian Cheng On 03/12/2015 05:15 AM, M.Staring at lumc.nl wrote: > Hi, > > I think the eigen library is a mature and very fast library for these kind of things: > http://eigen.tuxfamily.org/index.php?title=Main_Page > > You may want to check it out, to see if it offers what you need. > > It would be great to be able to use these within the itk. > > 2c > Marius > > -----Original Message----- > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > Sent: Wednesday, March 11, 2015 23:17 > To: Matt McCormick > Cc: Chuck Atkins; ITK > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix >>> library I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>> very inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I >>> got a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and >>> lapack, or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From hans-johnson at uiowa.edu Thu Mar 12 10:02:11 2015 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Thu, 12 Mar 2015 14:02:11 +0000 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500BEDC.40203@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> Message-ID: <77C1964E-8DB1-4BC9-9122-7983C484D076@healthcare.uiowa.edu> Jian, FYI: I have used Eigen for similar tasks to your dmritool. I have been very happy with it?s performance and feature set. Hans > On Mar 11, 2015, at 5:17 PM, Jian Cheng wrote: > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators > are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion > MRI data processing. > It has some files to add some supports of blas, lapack, mkl to > vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are > operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally > includes those functions, and also supports expression template to avoid > temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the > vector/matrix using openblas, lapack, or mkl can be found by running > those two tests > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not > sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first > patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix library >>> I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very >>> inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I got >>> a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and lapack, >>> or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ From blowekamp at mail.nih.gov Thu Mar 12 10:20:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 12 Mar 2015 10:20:53 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> Message-ID: <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Chuck, Thank you for giving us that important conclusion, under a quite difficult situations. I wonder if there is any distinction in the usage of vnl_matrix vs vnl_matrix_fixed. I would expect that operations done for pixel transforms should have there dimension know at run-time and should be able to use the vnl_matrix_fixed. I also have considered methods to transform a whole array of points at a time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there would be benefit with the library based operations. Brad On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: > I worked with Julie Langou, maintainer of LAPACK, on this project a few years ago. The funding situation ended up very strange and messy and we basically had to cram 3 months worth of effort into 3 weeks, so needless to say, we were not able to really achieve our goals. However, we spent a fair amount of time profiling ITK and analyzing it's hot spots from vnl to determine where to best spend the small ammount of time we had. The results were not as straight forward as we expected. It turns out that most of the use for vnl_matrix and vnl_vector was actually for an enourmous number of operations on very small sized vectors and matricies (dimensions of 2, 3, or 4), often for coordinate and geometry calculations or for small per-pixel operations that were not easily vectorized in the implementation at the time. In these cases, the overhead of calling out to a BLAS or LAPACK library was much too expensive and the existing use of VNL was far more optimal. This falls apart, however when trying to use vnl for more complex algorithms since the larger matrix operations will be where the benefit can be seen. So just re-implementing the vnl vector and matrix classes and operators with underlying BLAS and LAPACK routines turned out to not be the best solution for ITK as a whole. > > - Chuck > > On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp wrote: > Hello, > > If I was writing my own ITK classes, and needed a fast matrix library I would likely pursue an additional dependency on an efficient numeric library for that project, such as eigen. > > However for the broad appeal of ITK I would think a flexible back end would be best. As I think there are a variety of BLAS and LAPACK libraries available ( commercial, open source, vender free ). It would be nice to pick one what has been optimized for the current architecture. I would think it would be most flexible to use this interface in the back end of a chosen numeric interface ( currently VNL ). Unfortunately, I don't have as much experience with these libraries as I'd like. > > Brad > > On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: > > > Hi, > > > > I think the eigen library is a mature and very fast library for these kind of things: > > http://eigen.tuxfamily.org/index.php?title=Main_Page > > > > You may want to check it out, to see if it offers what you need. > > > > It would be great to be able to use these within the itk. > > > > 2c > > Marius > > > > -----Original Message----- > > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > > Sent: Wednesday, March 11, 2015 23:17 > > To: Matt McCormick > > Cc: Chuck Atkins; ITK > > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > > > Hi Matt, > > > > Thanks for your help, and also for the ITK workshop in UNC last time. > > > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > > With your help and discussion, I will be very glad to make my first patch to ITK. > > Thanks. > > > > best, > > Jian Cheng > > > > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: > >> Hi Jian, > >> > >> Yes, it would be wonderful to improve the efficiency of these basic > >> numerical operations. > >> > >> Funding for the Refactor Numerical Libraries has currently ended, and > >> the effort is currently frozen. However, you are more than welcome to > >> pick it up and we can help you get it into ITK. More information on > >> the patch submission process can be found here [1] and in the ITK > >> Software Guide. > >> > >> Thanks, > >> Matt > >> > >> [1] > >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo > >> ftwareProcess/SubmitAPatchToGerrit/index.html > >> > >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: > >>> Hi, > >>> > >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. > >>> Thus the performance is actually mainly determined by the matrix > >>> library I used. > >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is > >>> very inefficient because vnl matrix lib does not use blas and lapack. > >>> After I wrote my own matrix class which uses openblas and lapack, I > >>> got a hug gain of performance. > >>> > >>> I found there is a proposal to improve the efficiency of numerical > >>> libraries in ITK. > >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries > >>> I am not sure how is the progress of the proposal. > >>> I wonder when the vnl matrix lib can internally support blas and > >>> lapack, or mkl, so that we can just use it without lose of the efficiency. > >>> Thanks. > >>> > >>> best, > >>> Jian Cheng > >>> _______________________________________________ > >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > > > _______________________________________________ > > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Mar 12 10:41:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 10:41:09 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: Hi, >From the discussion so far, it appears the following serious of steps could be taken to move forward on performance: 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and vnl_matrix_fixed when possible. 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. 3) Add support for armadillo or eigen. 1) and 2) will be relatively easy to make, and will hopefully have an immediate impact on performance. 3) will take make work to happen, and it will take longer to impact the toolkit. We will need to have cross-platform builds of the libraries in the repository. Also, many ITK classes encapsulate their use of VNL very poorly, so it will not be as simple as swapping out or improving their backends. 2 cents, Matt On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp wrote: > Chuck, > > Thank you for giving us that important conclusion, under a quite difficult > situations. > > I wonder if there is any distinction in the usage of vnl_matrix vs > vnl_matrix_fixed. I would expect that operations done for pixel transforms > should have there dimension know at run-time and should be able to use the > vnl_matrix_fixed. > > I also have considered methods to transform a whole array of points at a > time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there > would be benefit with the library based operations. > > Brad > > > On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: > > I worked with Julie Langou, maintainer of LAPACK, on this project a few > years ago. The funding situation ended up very strange and messy and we > basically had to cram 3 months worth of effort into 3 weeks, so needless to > say, we were not able to really achieve our goals. However, we spent a fair > amount of time profiling ITK and analyzing it's hot spots from vnl to > determine where to best spend the small ammount of time we had. The results > were not as straight forward as we expected. It turns out that most of the > use for vnl_matrix and vnl_vector was actually for an enourmous number of > operations on very small sized vectors and matricies (dimensions of 2, 3, or > 4), often for coordinate and geometry calculations or for small per-pixel > operations that were not easily vectorized in the implementation at the > time. In these cases, the overhead of calling out to a BLAS or LAPACK > library was much too expensive and the existing use of VNL was far more > optimal. This falls apart, however when trying to use vnl for more complex > algorithms since the larger matrix operations will be where the benefit can > be seen. So just re-implementing the vnl vector and matrix classes and > operators with underlying BLAS and LAPACK routines turned out to not be the > best solution for ITK as a whole. > > - Chuck > > On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp > wrote: >> >> Hello, >> >> If I was writing my own ITK classes, and needed a fast matrix library I >> would likely pursue an additional dependency on an efficient numeric library >> for that project, such as eigen. >> >> However for the broad appeal of ITK I would think a flexible back end >> would be best. As I think there are a variety of BLAS and LAPACK libraries >> available ( commercial, open source, vender free ). It would be nice to pick >> one what has been optimized for the current architecture. I would think it >> would be most flexible to use this interface in the back end of a chosen >> numeric interface ( currently VNL ). Unfortunately, I don't have as much >> experience with these libraries as I'd like. >> >> Brad >> >> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >> >> > Hi, >> > >> > I think the eigen library is a mature and very fast library for these >> > kind of things: >> > http://eigen.tuxfamily.org/index.php?title=Main_Page >> > >> > You may want to check it out, to see if it offers what you need. >> > >> > It would be great to be able to use these within the itk. >> > >> > 2c >> > Marius >> > >> > -----Original Message----- >> > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >> > Behalf Of Jian Cheng >> > Sent: Wednesday, March 11, 2015 23:17 >> > To: Matt McCormick >> > Cc: Chuck Atkins; ITK >> > Subject: Re: [ITK-dev] efficiency of vnl_matrix >> > >> > Hi Matt, >> > >> > Thanks for your help, and also for the ITK workshop in UNC last time. >> > >> > It is very unfortunate. The efficiency of these numerical math operators >> > are very important for many applications. >> > >> > I recently released an ITK based toolbox, called dmritool, for diffusion >> > MRI data processing. >> > It has some files to add some supports of blas, lapack, mkl to >> > vnl_matrix and vnl_vector. >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >> > >> > Those functions are not internally for vnl_matrix class. They are >> > operators for the data pointer stored in vnl_matrix object. >> > Thus, later I made a N-dimensional array library which internally >> > includes those functions, and also supports expression template to avoid >> > temporary copies. >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >> > >> > The efficiency comparison between vnl_vector/vnl_matrix and the >> > vector/matrix using openblas, lapack, or mkl can be found by running those >> > two tests >> > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >> > >> > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >> > >> > Maybe some codes can be used as patches in somewhere in ITK. I am not >> > sure. Maybe we need more discussion on it. >> > With your help and discussion, I will be very glad to make my first >> > patch to ITK. >> > Thanks. >> > >> > best, >> > Jian Cheng >> > >> > >> > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> >> Hi Jian, >> >> >> >> Yes, it would be wonderful to improve the efficiency of these basic >> >> numerical operations. >> >> >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> >> the effort is currently frozen. However, you are more than welcome to >> >> pick it up and we can help you get it into ITK. More information on >> >> the patch submission process can be found here [1] and in the ITK >> >> Software Guide. >> >> >> >> Thanks, >> >> Matt >> >> >> >> [1] >> >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >> >> wrote: >> >>> Hi, >> >>> >> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >> >>> etc. >> >>> Thus the performance is actually mainly determined by the matrix >> >>> library I used. >> >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >> >>> very inefficient because vnl matrix lib does not use blas and lapack. >> >>> After I wrote my own matrix class which uses openblas and lapack, I >> >>> got a hug gain of performance. >> >>> >> >>> I found there is a proposal to improve the efficiency of numerical >> >>> libraries in ITK. >> >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> >>> I am not sure how is the progress of the proposal. >> >>> I wonder when the vnl matrix lib can internally support blas and >> >>> lapack, or mkl, so that we can just use it without lose of the >> >>> efficiency. >> >>> Thanks. >> >>> >> >>> best, >> >>> Jian Cheng >> >>> _______________________________________________ >> >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > >> > _______________________________________________ >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > _______________________________________________ >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > > From arnaudgelas at gmail.com Thu Mar 12 10:57:46 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 12 Mar 2015 15:57:46 +0100 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: <775D92BE-57F5-4B8C-B277-5C7C0C678C63@gmail.com> Hi, For linear sparse system, we have been using Eigen (using OPENBLAS, CHOLMOD) in the ITK context, here: https://github.com/MiguelAlgaba/itkEigenSolverTraits Best Arnaud > On 12 Mar 2015, at 15:41, Matt McCormick wrote: > > Hi, > > From the discussion so far, it appears the following serious of steps > could be taken to move forward on performance: > > 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and > vnl_matrix_fixed when possible. > > 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. > > 3) Add support for armadillo or eigen. > > 1) and 2) will be relatively easy to make, and will hopefully have an > immediate impact on performance. 3) will take make work to happen, > and it will take longer to impact the toolkit. We will need to have > cross-platform builds of the libraries in the repository. Also, many > ITK classes encapsulate their use of VNL very poorly, so it will not > be as simple as swapping out or improving their backends. > > 2 cents, > Matt > > On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp > wrote: >> Chuck, >> >> Thank you for giving us that important conclusion, under a quite difficult >> situations. >> >> I wonder if there is any distinction in the usage of vnl_matrix vs >> vnl_matrix_fixed. I would expect that operations done for pixel transforms >> should have there dimension know at run-time and should be able to use the >> vnl_matrix_fixed. >> >> I also have considered methods to transform a whole array of points at a >> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >> would be benefit with the library based operations. >> >> Brad >> >> >> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >> >> I worked with Julie Langou, maintainer of LAPACK, on this project a few >> years ago. The funding situation ended up very strange and messy and we >> basically had to cram 3 months worth of effort into 3 weeks, so needless to >> say, we were not able to really achieve our goals. However, we spent a fair >> amount of time profiling ITK and analyzing it's hot spots from vnl to >> determine where to best spend the small ammount of time we had. The results >> were not as straight forward as we expected. It turns out that most of the >> use for vnl_matrix and vnl_vector was actually for an enourmous number of >> operations on very small sized vectors and matricies (dimensions of 2, 3, or >> 4), often for coordinate and geometry calculations or for small per-pixel >> operations that were not easily vectorized in the implementation at the >> time. In these cases, the overhead of calling out to a BLAS or LAPACK >> library was much too expensive and the existing use of VNL was far more >> optimal. This falls apart, however when trying to use vnl for more complex >> algorithms since the larger matrix operations will be where the benefit can >> be seen. So just re-implementing the vnl vector and matrix classes and >> operators with underlying BLAS and LAPACK routines turned out to not be the >> best solution for ITK as a whole. >> >> - Chuck >> >> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >> wrote: >>> >>> Hello, >>> >>> If I was writing my own ITK classes, and needed a fast matrix library I >>> would likely pursue an additional dependency on an efficient numeric library >>> for that project, such as eigen. >>> >>> However for the broad appeal of ITK I would think a flexible back end >>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>> available ( commercial, open source, vender free ). It would be nice to pick >>> one what has been optimized for the current architecture. I would think it >>> would be most flexible to use this interface in the back end of a chosen >>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>> experience with these libraries as I'd like. >>> >>> Brad >>> >>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>> >>>> Hi, >>>> >>>> I think the eigen library is a mature and very fast library for these >>>> kind of things: >>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>> >>>> You may want to check it out, to see if it offers what you need. >>>> >>>> It would be great to be able to use these within the itk. >>>> >>>> 2c >>>> Marius >>>> >>>> -----Original Message----- >>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>> Behalf Of Jian Cheng >>>> Sent: Wednesday, March 11, 2015 23:17 >>>> To: Matt McCormick >>>> Cc: Chuck Atkins; ITK >>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>> >>>> Hi Matt, >>>> >>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>> >>>> It is very unfortunate. The efficiency of these numerical math operators >>>> are very important for many applications. >>>> >>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>> MRI data processing. >>>> It has some files to add some supports of blas, lapack, mkl to >>>> vnl_matrix and vnl_vector. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>> >>>> Those functions are not internally for vnl_matrix class. They are >>>> operators for the data pointer stored in vnl_matrix object. >>>> Thus, later I made a N-dimensional array library which internally >>>> includes those functions, and also supports expression template to avoid >>>> temporary copies. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>> >>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>> two tests >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>> >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>> >>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>> sure. Maybe we need more discussion on it. >>>> With your help and discussion, I will be very glad to make my first >>>> patch to ITK. >>>> Thanks. >>>> >>>> best, >>>> Jian Cheng >>>> >>>> >>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>> Hi Jian, >>>>> >>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>> numerical operations. >>>>> >>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>> the effort is currently frozen. However, you are more than welcome to >>>>> pick it up and we can help you get it into ITK. More information on >>>>> the patch submission process can be found here [1] and in the ITK >>>>> Software Guide. >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] >>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>> >>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>> wrote: >>>>>> Hi, >>>>>> >>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>> etc. >>>>>> Thus the performance is actually mainly determined by the matrix >>>>>> library I used. >>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>> got a hug gain of performance. >>>>>> >>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>> libraries in ITK. >>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>> I am not sure how is the progress of the proposal. >>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>> efficiency. >>>>>> Thanks. >>>>>> >>>>>> best, >>>>>> Jian Cheng >>>>>> _______________________________________________ >>>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>> >>>> _______________________________________________ >>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>> _______________________________________________ >>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>> >> >> > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jian.cheng.1983 at gmail.com Thu Mar 12 11:39:03 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 11:39:03 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: <5501B317.3020108@gmail.com> Hi, For (2), the attachment is a comparison I made. It adds additional tests on vnl to the code from the previous link http://nghiaho.com/?p=1726 . Some header files can be downloaded from https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include Then you can build and run // With eigen // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG // With ARMA OpenBLAS // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp -lopenblas -O3 -DNDEBUG -DHAVE_INLINE // with vnl // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG -DUTL_USE_FASTLAPACK // with vnl + openblas // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK // with vnl + mkl // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG -DUTL_USE_FASTLAPACK // with utl+openblas // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK // with utl + mkl; // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK In my experiments, using blas functions from mkl is the most efficient way. best, Jian Cheng On 03/12/2015 10:41 AM, Matt McCormick wrote: > Hi, > > From the discussion so far, it appears the following serious of steps > could be taken to move forward on performance: > > 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and > vnl_matrix_fixed when possible. > > 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. > > 3) Add support for armadillo or eigen. > > 1) and 2) will be relatively easy to make, and will hopefully have an > immediate impact on performance. 3) will take make work to happen, > and it will take longer to impact the toolkit. We will need to have > cross-platform builds of the libraries in the repository. Also, many > ITK classes encapsulate their use of VNL very poorly, so it will not > be as simple as swapping out or improving their backends. > > 2 cents, > Matt > > On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp > wrote: >> Chuck, >> >> Thank you for giving us that important conclusion, under a quite difficult >> situations. >> >> I wonder if there is any distinction in the usage of vnl_matrix vs >> vnl_matrix_fixed. I would expect that operations done for pixel transforms >> should have there dimension know at run-time and should be able to use the >> vnl_matrix_fixed. >> >> I also have considered methods to transform a whole array of points at a >> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >> would be benefit with the library based operations. >> >> Brad >> >> >> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >> >> I worked with Julie Langou, maintainer of LAPACK, on this project a few >> years ago. The funding situation ended up very strange and messy and we >> basically had to cram 3 months worth of effort into 3 weeks, so needless to >> say, we were not able to really achieve our goals. However, we spent a fair >> amount of time profiling ITK and analyzing it's hot spots from vnl to >> determine where to best spend the small ammount of time we had. The results >> were not as straight forward as we expected. It turns out that most of the >> use for vnl_matrix and vnl_vector was actually for an enourmous number of >> operations on very small sized vectors and matricies (dimensions of 2, 3, or >> 4), often for coordinate and geometry calculations or for small per-pixel >> operations that were not easily vectorized in the implementation at the >> time. In these cases, the overhead of calling out to a BLAS or LAPACK >> library was much too expensive and the existing use of VNL was far more >> optimal. This falls apart, however when trying to use vnl for more complex >> algorithms since the larger matrix operations will be where the benefit can >> be seen. So just re-implementing the vnl vector and matrix classes and >> operators with underlying BLAS and LAPACK routines turned out to not be the >> best solution for ITK as a whole. >> >> - Chuck >> tage of the performance gains of large block matrix and vector >> operations seen with optimized BLAS and LAPACK libraries, the >> computations needed to be re-worked to act in an SoA (struct of >> arrays) fashion instead. Given our limited time and resources, this >> was out of scope for what we could tackle. >> >> * Typically AoS and SoA refer to storage layout but I'm using it to >> refer to computation layout. The terminology may not be correct but >> I think you can understand what I mean. >> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >> wrote: >>> Hello, >>> >>> If I was writing my own ITK classes, and needed a fast matrix library I >>> would likely pursue an additional dependency on an efficient numeric library >>> for that project, such as eigen. >>> >>> However for the broad appeal of ITK I would think a flexible back end >>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>> available ( commercial, open source, vender free ). It would be nice to pick >>> one what has been optimized for the current architecture. I would think it >>> would be most flexible to use this interface in the back end of a chosen >>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>> experience with these libraries as I'd like. >>> >>> Brad >>> >>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>> >>>> Hi, >>>> >>>> I think the eigen library is a mature and very fast library for these >>>> kind of things: >>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>> >>>> You may want to check it out, to see if it offers what you need. >>>> >>>> It would be great to be able to use these within the itk. >>>> >>>> 2c >>>> Marius >>>> >>>> -----Original Message----- >>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>> Behalf Of Jian Cheng >>>> Sent: Wednesday, March 11, 2015 23:17 >>>> To: Matt McCormick >>>> Cc: Chuck Atkins; ITK >>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>> >>>> Hi Matt, >>>> >>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>> >>>> It is very unfortunate. The efficiency of these numerical math operators >>>> are very important for many applications. >>>> >>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>> MRI data processing. >>>> It has some files to add some supports of blas, lapack, mkl to >>>> vnl_matrix and vnl_vector. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>> >>>> Those functions are not internally for vnl_matrix class. They are >>>> operators for the data pointer stored in vnl_matrix object. >>>> Thus, later I made a N-dimensional array library which internally >>>> includes those functions, and also supports expression template to avoid >>>> temporary copies. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>> >>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>> two tests >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>> >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>> >>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>> sure. Maybe we need more discussion on it. >>>> With your help and discussion, I will be very glad to make my first >>>> patch to ITK. >>>> Thanks. >>>> >>>> best, >>>> Jian Cheng >>>> >>>> >>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>> Hi Jian, >>>>> >>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>> numerical operations. >>>>> >>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>> the effort is currently frozen. However, you are more than welcome to >>>>> pick it up and we can help you get it into ITK. More information on >>>>> the patch submission process can be found here [1] and in the ITK >>>>> Software Guide. >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] >>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>> >>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>> wrote: >>>>>> Hi, >>>>>> >>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>> etc. >>>>>> Thus the performance is actually mainly determined by the matrix >>>>>> library I used. >>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>> got a hug gain of performance. >>>>>> >>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>> libraries in ITK. >>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>> I am not sure how is the progress of the proposal. >>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>> efficiency. >>>>>> Thanks. >>>>>> >>>>>> best, >>>>>> Jian Cheng >>>>>> _______________________________________________ >>>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>> _______________________________________________ >>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>> _______________________________________________ >>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> -------------- next part -------------- A non-text attachment was scrubbed... Name: test_matrix_pseudoinverse.cpp Type: text/x-c++src Size: 11455 bytes Desc: not available URL: From jian.cheng.1983 at gmail.com Thu Mar 12 17:44:14 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 17:44:14 -0400 Subject: [ITK-dev] ITK changes VTK_LIBRARIES? Message-ID: <550208AE.8070100@gmail.com> Hi, The the recent release of ITK may changes VTK_LIBRARIES, when I build ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. Please see the attached toy example, and check if the issue can be reproduced on your side. Thanks. I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. If I build ITK with VTK, VTK_LIBRARIES will be changed to VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I find VTK. If I build ITK without VTK, everything is fine. A workaround is to find VTK first, then copy VTK_LIBRARIES to a variable, then find ITK and copy VTK_LIBRARIES back. best, Jian Cheng -------------- next part -------------- project( itkEigenSolverTraits ) cmake_minimum_required( VERSION 2.8 ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) set(VTK_LIBRARIES_back ${VTK_LIBRARIES}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") find_package( ITK REQUIRED ) include( ${ITK_USE_FILE} ) # set(VTK_LIBRARIES ${VTK_LIBRARIES_back}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") message("ITK_LIBRARIES=${ITK_LIBRARIES}") add_executable(main main.cxx) target_link_libraries(main ${ITK_LIBRARIES} ${VTK_LIBRARIES}) -------------- next part -------------- #include "itkImage.h" int main (int argc, char const* argv[]) { typedef itk::Image ImageType; ImageType::Pointer image = ImageType::New(); return 0; } From matt.mccormick at kitware.com Thu Mar 12 19:30:47 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 19:30:47 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5501B317.3020108@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: Hi Jian, Thanks for sharing these performance testing coding. As Chuck also demonstrated, measuring performance is critical for real progress. Thanks, Matt On Thu, Mar 12, 2015 at 11:39 AM, Jian Cheng wrote: > Hi, > > For (2), the attachment is a comparison I made. > It adds additional tests on vnl to the code from the previous link > http://nghiaho.com/?p=1726 . > Some header files can be downloaded from > https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include > > Then you can build and run > // With eigen > // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG > > // With ARMA OpenBLAS > // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp > -lopenblas -O3 -DNDEBUG -DHAVE_INLINE > > // with vnl > // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with vnl + openblas > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with vnl + mkl > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with utl+openblas > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with utl + mkl; > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > > In my experiments, using blas functions from mkl is the most efficient way. > > best, > Jian Cheng > > On 03/12/2015 10:41 AM, Matt McCormick wrote: >> Hi, >> >> From the discussion so far, it appears the following serious of steps >> could be taken to move forward on performance: >> >> 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and >> vnl_matrix_fixed when possible. >> >> 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. >> >> 3) Add support for armadillo or eigen. >> >> 1) and 2) will be relatively easy to make, and will hopefully have an >> immediate impact on performance. 3) will take make work to happen, >> and it will take longer to impact the toolkit. We will need to have >> cross-platform builds of the libraries in the repository. Also, many >> ITK classes encapsulate their use of VNL very poorly, so it will not >> be as simple as swapping out or improving their backends. >> >> 2 cents, >> Matt >> >> On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp >> wrote: >>> Chuck, >>> >>> Thank you for giving us that important conclusion, under a quite difficult >>> situations. >>> >>> I wonder if there is any distinction in the usage of vnl_matrix vs >>> vnl_matrix_fixed. I would expect that operations done for pixel transforms >>> should have there dimension know at run-time and should be able to use the >>> vnl_matrix_fixed. >>> >>> I also have considered methods to transform a whole array of points at a >>> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >>> would be benefit with the library based operations. >>> >>> Brad >>> >>> >>> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >>> >>> I worked with Julie Langou, maintainer of LAPACK, on this project a few >>> years ago. The funding situation ended up very strange and messy and we >>> basically had to cram 3 months worth of effort into 3 weeks, so needless to >>> say, we were not able to really achieve our goals. However, we spent a fair >>> amount of time profiling ITK and analyzing it's hot spots from vnl to >>> determine where to best spend the small ammount of time we had. The results >>> were not as straight forward as we expected. It turns out that most of the >>> use for vnl_matrix and vnl_vector was actually for an enourmous number of >>> operations on very small sized vectors and matricies (dimensions of 2, 3, or >>> 4), often for coordinate and geometry calculations or for small per-pixel >>> operations that were not easily vectorized in the implementation at the >>> time. In these cases, the overhead of calling out to a BLAS or LAPACK >>> library was much too expensive and the existing use of VNL was far more >>> optimal. This falls apart, however when trying to use vnl for more complex >>> algorithms since the larger matrix operations will be where the benefit can >>> be seen. So just re-implementing the vnl vector and matrix classes and >>> operators with underlying BLAS and LAPACK routines turned out to not be the >>> best solution for ITK as a whole. >>> >>> - Chuck >>> tage of the performance gains of large block matrix and vector >>> operations seen with optimized BLAS and LAPACK libraries, the >>> computations needed to be re-worked to act in an SoA (struct of >>> arrays) fashion instead. Given our limited time and resources, this >>> was out of scope for what we could tackle. >>> >>> * Typically AoS and SoA refer to storage layout but I'm using it to >>> refer to computation layout. The terminology may not be correct but >>> I think you can understand what I mean. >>> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >>> wrote: >>>> Hello, >>>> >>>> If I was writing my own ITK classes, and needed a fast matrix library I >>>> would likely pursue an additional dependency on an efficient numeric library >>>> for that project, such as eigen. >>>> >>>> However for the broad appeal of ITK I would think a flexible back end >>>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>>> available ( commercial, open source, vender free ). It would be nice to pick >>>> one what has been optimized for the current architecture. I would think it >>>> would be most flexible to use this interface in the back end of a chosen >>>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>>> experience with these libraries as I'd like. >>>> >>>> Brad >>>> >>>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>>> >>>>> Hi, >>>>> >>>>> I think the eigen library is a mature and very fast library for these >>>>> kind of things: >>>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>>> >>>>> You may want to check it out, to see if it offers what you need. >>>>> >>>>> It would be great to be able to use these within the itk. >>>>> >>>>> 2c >>>>> Marius >>>>> >>>>> -----Original Message----- >>>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>>> Behalf Of Jian Cheng >>>>> Sent: Wednesday, March 11, 2015 23:17 >>>>> To: Matt McCormick >>>>> Cc: Chuck Atkins; ITK >>>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>>> >>>>> Hi Matt, >>>>> >>>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>>> >>>>> It is very unfortunate. The efficiency of these numerical math operators >>>>> are very important for many applications. >>>>> >>>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>>> MRI data processing. >>>>> It has some files to add some supports of blas, lapack, mkl to >>>>> vnl_matrix and vnl_vector. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>>> >>>>> Those functions are not internally for vnl_matrix class. They are >>>>> operators for the data pointer stored in vnl_matrix object. >>>>> Thus, later I made a N-dimensional array library which internally >>>>> includes those functions, and also supports expression template to avoid >>>>> temporary copies. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>>> >>>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>>> two tests >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>>> >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>>> >>>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>>> sure. Maybe we need more discussion on it. >>>>> With your help and discussion, I will be very glad to make my first >>>>> patch to ITK. >>>>> Thanks. >>>>> >>>>> best, >>>>> Jian Cheng >>>>> >>>>> >>>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>>> Hi Jian, >>>>>> >>>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>>> numerical operations. >>>>>> >>>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>>> the effort is currently frozen. However, you are more than welcome to >>>>>> pick it up and we can help you get it into ITK. More information on >>>>>> the patch submission process can be found here [1] and in the ITK >>>>>> Software Guide. >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] >>>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>>> >>>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>>> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>>> etc. >>>>>>> Thus the performance is actually mainly determined by the matrix >>>>>>> library I used. >>>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>>> got a hug gain of performance. >>>>>>> >>>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>>> libraries in ITK. >>>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>>> I am not sure how is the progress of the proposal. >>>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>>> efficiency. >>>>>>> Thanks. >>>>>>> >>>>>>> best, >>>>>>> Jian Cheng >>>>>>> _______________________________________________ >>>>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>>> _______________________________________________ >>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>>> _______________________________________________ >>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>> > From matt.mccormick at kitware.com Thu Mar 12 19:31:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 19:31:21 -0400 Subject: [ITK-dev] [ITK] ITK changes VTK_LIBRARIES? In-Reply-To: <550208AE.8070100@gmail.com> References: <550208AE.8070100@gmail.com> Message-ID: Hi Jian, Please use the recently released VTK 6.2.0 where this issue has been addressed. Thanks, Matt On Thu, Mar 12, 2015 at 5:44 PM, Jian Cheng wrote: > Hi, > > The the recent release of ITK may changes VTK_LIBRARIES, when I build > ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. > Please see the attached toy example, and check if the issue can be > reproduced on your side. Thanks. > I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. > If I build ITK with VTK, VTK_LIBRARIES will be changed to > VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I > find VTK. > If I build ITK without VTK, everything is fine. > A workaround is to find VTK first, then copy VTK_LIBRARIES to a > variable, then find ITK and copy VTK_LIBRARIES back. > > best, > Jian Cheng > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From jian.cheng.1983 at gmail.com Thu Mar 12 19:56:24 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 19:56:24 -0400 Subject: [ITK-dev] [ITK] ITK changes VTK_LIBRARIES? In-Reply-To: References: <550208AE.8070100@gmail.com> Message-ID: <550227A8.6090105@gmail.com> Hi Matt, Great! I just tried VTK 6.2.0. It works now. Thank you for your help! best, Jian Cheng On 03/12/2015 07:31 PM, Matt McCormick wrote: > Hi Jian, > > Please use the recently released VTK 6.2.0 where this issue has been addressed. > > Thanks, > Matt > > On Thu, Mar 12, 2015 at 5:44 PM, Jian Cheng wrote: >> Hi, >> >> The the recent release of ITK may changes VTK_LIBRARIES, when I build >> ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. >> Please see the attached toy example, and check if the issue can be >> reproduced on your side. Thanks. >> I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. >> If I build ITK with VTK, VTK_LIBRARIES will be changed to >> VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I >> find VTK. >> If I build ITK without VTK, everything is fine. >> A workaround is to find VTK first, then copy VTK_LIBRARIES to a >> variable, then find ITK and copy VTK_LIBRARIES back. >> >> best, >> Jian Cheng >> >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> From stnava at gmail.com Thu Mar 12 20:08:58 2015 From: stnava at gmail.com (brian avants) Date: Thu, 12 Mar 2015 20:08:58 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: All fantastic directions to explore. +We all could benefit from this fundamental improvement in numerics. my guess: (1) and (2) from Matt's previous email are likely to stick, with relatively low effort. Other stuff ... Only if some individual takes it personally. We at penn, uva, uiowa are (likely) to help on this. Keep us apprised. Hi Jian, Thanks for sharing these performance testing coding. As Chuck also demonstrated, measuring performance is critical for real progress. Thanks, Matt On Thu, Mar 12, 2015 at 11:39 AM, Jian Cheng wrote: > Hi, > > For (2), the attachment is a comparison I made. > It adds additional tests on vnl to the code from the previous link > http://nghiaho.com/?p=1726 . > Some header files can be downloaded from > https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include > > Then you can build and run > // With eigen > // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG > > // With ARMA OpenBLAS > // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp > -lopenblas -O3 -DNDEBUG -DHAVE_INLINE > > // with vnl > // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with vnl + openblas > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with vnl + mkl > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with utl+openblas > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with utl + mkl; > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > > In my experiments, using blas functions from mkl is the most efficient way. > > best, > Jian Cheng > > On 03/12/2015 10:41 AM, Matt McCormick wrote: >> Hi, >> >> From the discussion so far, it appears the following serious of steps >> could be taken to move forward on performance: >> >> 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and >> vnl_matrix_fixed when possible. >> >> 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. >> >> 3) Add support for armadillo or eigen. >> >> 1) and 2) will be relatively easy to make, and will hopefully have an >> immediate impact on performance. 3) will take make work to happen, >> and it will take longer to impact the toolkit. We will need to have >> cross-platform builds of the libraries in the repository. Also, many >> ITK classes encapsulate their use of VNL very poorly, so it will not >> be as simple as swapping out or improving their backends. >> >> 2 cents, >> Matt >> >> On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp >> wrote: >>> Chuck, >>> >>> Thank you for giving us that important conclusion, under a quite difficult >>> situations. >>> >>> I wonder if there is any distinction in the usage of vnl_matrix vs >>> vnl_matrix_fixed. I would expect that operations done for pixel transforms >>> should have there dimension know at run-time and should be able to use the >>> vnl_matrix_fixed. >>> >>> I also have considered methods to transform a whole array of points at a >>> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >>> would be benefit with the library based operations. >>> >>> Brad >>> >>> >>> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >>> >>> I worked with Julie Langou, maintainer of LAPACK, on this project a few >>> years ago. The funding situation ended up very strange and messy and we >>> basically had to cram 3 months worth of effort into 3 weeks, so needless to >>> say, we were not able to really achieve our goals. However, we spent a fair >>> amount of time profiling ITK and analyzing it's hot spots from vnl to >>> determine where to best spend the small ammount of time we had. The results >>> were not as straight forward as we expected. It turns out that most of the >>> use for vnl_matrix and vnl_vector was actually for an enourmous number of >>> operations on very small sized vectors and matricies (dimensions of 2, 3, or >>> 4), often for coordinate and geometry calculations or for small per-pixel >>> operations that were not easily vectorized in the implementation at the >>> time. In these cases, the overhead of calling out to a BLAS or LAPACK >>> library was much too expensive and the existing use of VNL was far more >>> optimal. This falls apart, however when trying to use vnl for more complex >>> algorithms since the larger matrix operations will be where the benefit can >>> be seen. So just re-implementing the vnl vector and matrix classes and >>> operators with underlying BLAS and LAPACK routines turned out to not be the >>> best solution for ITK as a whole. >>> >>> - Chuck >>> tage of the performance gains of large block matrix and vector >>> operations seen with optimized BLAS and LAPACK libraries, the >>> computations needed to be re-worked to act in an SoA (struct of >>> arrays) fashion instead. Given our limited time and resources, this >>> was out of scope for what we could tackle. >>> >>> * Typically AoS and SoA refer to storage layout but I'm using it to >>> refer to computation layout. The terminology may not be correct but >>> I think you can understand what I mean. >>> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp < blowekamp at mail.nih.gov> >>> wrote: >>>> Hello, >>>> >>>> If I was writing my own ITK classes, and needed a fast matrix library I >>>> would likely pursue an additional dependency on an efficient numeric library >>>> for that project, such as eigen. >>>> >>>> However for the broad appeal of ITK I would think a flexible back end >>>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>>> available ( commercial, open source, vender free ). It would be nice to pick >>>> one what has been optimized for the current architecture. I would think it >>>> would be most flexible to use this interface in the back end of a chosen >>>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>>> experience with these libraries as I'd like. >>>> >>>> Brad >>>> >>>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>>> >>>>> Hi, >>>>> >>>>> I think the eigen library is a mature and very fast library for these >>>>> kind of things: >>>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>>> >>>>> You may want to check it out, to see if it offers what you need. >>>>> >>>>> It would be great to be able to use these within the itk. >>>>> >>>>> 2c >>>>> Marius >>>>> >>>>> -----Original Message----- >>>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>>> Behalf Of Jian Cheng >>>>> Sent: Wednesday, March 11, 2015 23:17 >>>>> To: Matt McCormick >>>>> Cc: Chuck Atkins; ITK >>>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>>> >>>>> Hi Matt, >>>>> >>>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>>> >>>>> It is very unfortunate. The efficiency of these numerical math operators >>>>> are very important for many applications. >>>>> >>>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>>> MRI data processing. >>>>> It has some files to add some supports of blas, lapack, mkl to >>>>> vnl_matrix and vnl_vector. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>>> >>>>> Those functions are not internally for vnl_matrix class. They are >>>>> operators for the data pointer stored in vnl_matrix object. >>>>> Thus, later I made a N-dimensional array library which internally >>>>> includes those functions, and also supports expression template to avoid >>>>> temporary copies. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>>> >>>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>>> two tests >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>>> >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>>> >>>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>>> sure. Maybe we need more discussion on it. >>>>> With your help and discussion, I will be very glad to make my first >>>>> patch to ITK. >>>>> Thanks. >>>>> >>>>> best, >>>>> Jian Cheng >>>>> >>>>> >>>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>>> Hi Jian, >>>>>> >>>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>>> numerical operations. >>>>>> >>>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>>> the effort is currently frozen. However, you are more than welcome to >>>>>> pick it up and we can help you get it into ITK. More information on >>>>>> the patch submission process can be found here [1] and in the ITK >>>>>> Software Guide. >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] >>>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>>> >>>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng < jian.cheng.1983 at gmail.com> >>>>>> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>>> etc. >>>>>>> Thus the performance is actually mainly determined by the matrix >>>>>>> library I used. >>>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>>> got a hug gain of performance. >>>>>>> >>>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>>> libraries in ITK. >>>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>>> I am not sure how is the progress of the proposal. >>>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>>> efficiency. >>>>>>> Thanks. >>>>>>> >>>>>>> best, >>>>>>> Jian Cheng >>>>>>> _______________________________________________ >>>>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>>> _______________________________________________ >>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>>>> _______________________________________________ >>>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>> > _______________________________________________ Powered by 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://public.kitware.com/mailman/listinfo/insight-developers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jian.cheng.1983 at gmail.com Thu Mar 12 21:56:15 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 21:56:15 -0400 Subject: [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: <550243BF.7060607@gmail.com> Hi, I agree with Brian. Everyone who uses ITK with vnl_matrix will finally realize vnl_matrix is very inefficient, then will try to make it efficient, by using backend blas/lapack api, or using other efficient matrix libs. Thus it is better to make only one efficient way in ITK for everyone. This numerical lib is fundamental for many applications. Thus we need more discussions before doing anything. For (2), it is possible and needs less effort. We have two ways. a) Do not touch vnl_matrix class, just make some external functions using blas/lapack api to work on the data pointer stored in vnl_matrix objects. This is the way I have done. b) Put those functions into vnl_matrix member functions. Thus change the implementation of vnl_matrix, but do not change its api. For (3), we have two ways. a) remove vnl_matrix everywhere and replace it using eigen or armadillo. As we discussed in previous emails, some people already did this in their own ITK classes. b) Still use vnl_matrix, but change its implementation by using eigen/armadillo, without changing the api of vnl_matrix. best, Jian Cheng On 03/12/2015 08:08 PM, brian avants wrote: > > All fantastic directions to explore. +We all could benefit from this > fundamental improvement in numerics. my guess: (1) and (2) from > Matt's previous email are likely to stick, with relatively low > effort. Other stuff ... Only if some individual takes it personally. > We at penn, uva, uiowa are (likely) to help on this. Keep us apprised. > > From blowekamp at mail.nih.gov Fri Mar 13 08:48:26 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 13 Mar 2015 08:48:26 -0400 Subject: [ITK-dev] We need a little remote module KWStyle rallying here Message-ID: Hello folks! We recently have modularized the KWStyle test. This has enabled style tests on remote, external and local module. So many of the remote modules now have a failing style tests on the dashboard. May of the failures are just a simple change in the header guarder. I am going to start with IOFDF today. What are you going to help with? Brad From bill.lorensen at gmail.com Fri Mar 13 13:13:22 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 13 Mar 2015 10:13:22 -0700 Subject: [ITK-dev] We need a little remote module KWStyle rallying here In-Reply-To: References: Message-ID: I'll take care of the wiki examples and the skull stripper. On Fri, Mar 13, 2015 at 5:48 AM, Bradley Lowekamp wrote: > Hello folks! > > We recently have modularized the KWStyle test. This has enabled style tests on remote, external and local module. > > So many of the remote modules now have a failing style tests on the dashboard. May of the failures are just a simple change in the header guarder. > > I am going to start with IOFDF today. > > What are you going to help with? > > Brad > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers -- Unpaid intern in BillsBasement at noware dot com From blowekamp at mail.nih.gov Fri Mar 13 15:55:36 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 13 Mar 2015 15:55:36 -0400 Subject: [ITK-dev] NLM dashboards down over the weekend Message-ID: <4CBCAA92-2978-4B16-80E2-2AE556F49512@mail.nih.gov> Our server room will be under going some maintenance of the weekend, so many of NLM dashboard builds will be down over the weekend. The machines will be turned again on Monday morning. Apologizes for the inconvenience, Brad From blowekamp at mail.nih.gov Tue Mar 17 10:44:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 17 Mar 2015 10:44:39 -0400 Subject: [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> Message-ID: <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Hans, Thanks for sharing this work. I was able to utilize your script and methodology for SimpleITK to explicitly instantiate about 16 classes with their commonly used arguments as by SimpleITK [1]. I created a separate library in SimpleITK which contains these explicitly instantiated classes [2]. These instantiations reduced the size of the .o files for SimpleITK by ~30% (500MB), and enabled linking once again on Windows 64. Some systems seem to also gain significant performance in build time (over 2X), but there are many reasons for it including running into memory or IO limitations on the individual system. However I was not able to get it working with the explicitly instantiated library as shared. The mixtures of export specification of the initial ITK declaration and the explicit instantiation linking specification didn't appear to work. I think they need to be consistent? I followed the methodology that was done for the MetaDataObjects[3]. If I build ITK and SimpleITK as shared but with the Explicit library as static it appears to work. Any help on explicitly instantiation with shared libraries would be appreciated! Thanks, Brad [1] https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h [2] https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt [3] https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 On Jan 28, 2015, at 12:16 PM, Johnson, Hans J wrote: > Yes! I?d love someone to investigate further: > > > https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting > > https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 > > > Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Mar 17 11:00:45 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 11:00:45 -0400 Subject: [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Message-ID: Hi, Instead of maintaining a duplicate set of type instantiations, it may be worth exploiting the ITK_WRAP_EXPLICIT option (see Wrapping/Generators/Explicit). This will re-use all the wrapping type instantiation logic, which is also CMake configurable. 2 cents, Matt On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp wrote: > Hans, > > Thanks for sharing this work. > > I was able to utilize your script and methodology for SimpleITK to > explicitly instantiate about 16 classes with their commonly used arguments > as by SimpleITK [1]. I created a separate library in SimpleITK which > contains these explicitly instantiated classes [2]. > > These instantiations reduced the size of the .o files for SimpleITK by ~30% > (500MB), and enabled linking once again on Windows 64. Some systems seem to > also gain significant performance in build time (over 2X), but there are > many reasons for it including running into memory or IO limitations on the > individual system. > > However I was not able to get it working with the explicitly instantiated > library as shared. The mixtures of export specification of the initial ITK > declaration and the explicit instantiation linking specification didn't > appear to work. I think they need to be consistent? I followed the > methodology that was done for the MetaDataObjects[3]. If I build ITK and > SimpleITK as shared but with the Explicit library as static it appears to > work. > > Any help on explicitly instantiation with shared libraries would be > appreciated! > > Thanks, > Brad > > [1] > https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h > [2] > https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt > [3] > https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 > > On Jan 28, 2015, at 12:16 PM, Johnson, Hans J > wrote: > > Yes! I?d love someone to investigate further: > > > https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting > > https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 > > > Hans > > > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > From blowekamp at mail.nih.gov Tue Mar 17 11:05:37 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 17 Mar 2015 11:05:37 -0400 Subject: [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Message-ID: <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> Matt, That part has need been working for a very long time, and many of the parts that it used have been removed from ITK. Do you know of people using that part of Wrapping? Also the goal of that project was to instantiate everything, not just the most frequently used components. Additionally having to build WrapITK, would not make the compilation of SimpleITK any quicker. Brad On Mar 17, 2015, at 11:00 AM, Matt McCormick wrote: > Hi, > > Instead of maintaining a duplicate set of type instantiations, it may > be worth exploiting the ITK_WRAP_EXPLICIT option (see > Wrapping/Generators/Explicit). This will re-use all the wrapping type > instantiation logic, which is also CMake configurable. > > 2 cents, > Matt > > > > On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp > wrote: >> Hans, >> >> Thanks for sharing this work. >> >> I was able to utilize your script and methodology for SimpleITK to >> explicitly instantiate about 16 classes with their commonly used arguments >> as by SimpleITK [1]. I created a separate library in SimpleITK which >> contains these explicitly instantiated classes [2]. >> >> These instantiations reduced the size of the .o files for SimpleITK by ~30% >> (500MB), and enabled linking once again on Windows 64. Some systems seem to >> also gain significant performance in build time (over 2X), but there are >> many reasons for it including running into memory or IO limitations on the >> individual system. >> >> However I was not able to get it working with the explicitly instantiated >> library as shared. The mixtures of export specification of the initial ITK >> declaration and the explicit instantiation linking specification didn't >> appear to work. I think they need to be consistent? I followed the >> methodology that was done for the MetaDataObjects[3]. If I build ITK and >> SimpleITK as shared but with the Explicit library as static it appears to >> work. >> >> Any help on explicitly instantiation with shared libraries would be >> appreciated! >> >> Thanks, >> Brad >> >> [1] >> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h >> [2] >> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt >> [3] >> https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 >> >> On Jan 28, 2015, at 12:16 PM, Johnson, Hans J >> wrote: >> >> Yes! I?d love someone to investigate further: >> >> >> https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting >> >> https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 >> >> >> Hans >> >> >> >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> From matt.mccormick at kitware.com Tue Mar 17 12:21:26 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 12:21:26 -0400 Subject: [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> Message-ID: Hi Brad, > That part has need been working for a very long time, and many of the parts that it used have been removed from ITK. Do you know of people using that part of Wrapping? No, the code base would need to be cleaned up. > Also the goal of that project was to instantiate everything, not just the most frequently used components. Additionally having to build WrapITK, would not make the compilation of SimpleITK any quicker. The modules that are built are instantiated, and only with the types specified. Eventually there should be a CastXML binary, so enabling should not take any longer. Matt > Brad > > On Mar 17, 2015, at 11:00 AM, Matt McCormick wrote: > >> Hi, >> >> Instead of maintaining a duplicate set of type instantiations, it may >> be worth exploiting the ITK_WRAP_EXPLICIT option (see >> Wrapping/Generators/Explicit). This will re-use all the wrapping type >> instantiation logic, which is also CMake configurable. >> >> 2 cents, >> Matt >> >> >> >> On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp >> wrote: >>> Hans, >>> >>> Thanks for sharing this work. >>> >>> I was able to utilize your script and methodology for SimpleITK to >>> explicitly instantiate about 16 classes with their commonly used arguments >>> as by SimpleITK [1]. I created a separate library in SimpleITK which >>> contains these explicitly instantiated classes [2]. >>> >>> These instantiations reduced the size of the .o files for SimpleITK by ~30% >>> (500MB), and enabled linking once again on Windows 64. Some systems seem to >>> also gain significant performance in build time (over 2X), but there are >>> many reasons for it including running into memory or IO limitations on the >>> individual system. >>> >>> However I was not able to get it working with the explicitly instantiated >>> library as shared. The mixtures of export specification of the initial ITK >>> declaration and the explicit instantiation linking specification didn't >>> appear to work. I think they need to be consistent? I followed the >>> methodology that was done for the MetaDataObjects[3]. If I build ITK and >>> SimpleITK as shared but with the Explicit library as static it appears to >>> work. >>> >>> Any help on explicitly instantiation with shared libraries would be >>> appreciated! >>> >>> Thanks, >>> Brad >>> >>> [1] >>> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h >>> [2] >>> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt >>> [3] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 >>> >>> On Jan 28, 2015, at 12:16 PM, Johnson, Hans J >>> wrote: >>> >>> Yes! I?d love someone to investigate further: >>> >>> >>> https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting >>> >>> https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 >>> >>> >>> Hans >>> >>> >>> >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >>> > From manuel.grizonnet at gmail.com Tue Mar 24 12:16:57 2015 From: manuel.grizonnet at gmail.com (Manuel Grizonnet) Date: Tue, 24 Mar 2015 17:16:57 +0100 Subject: [ITK-dev] Size of ITK source package? Message-ID: Hi, I've just downloaded ITK source package from sourceforge and we're surprised by the size of the source tarball (more than 250Mo). Looking at the contain, it is due to a hidden directory (ExternalData) which contains only md5 sums. I don't think if it is really mandatory to compile the project from source and it would drastically decrease the size of the archive. Regards, -- Manuel Grizonnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Mar 24 12:57:56 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 24 Mar 2015 12:57:56 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: References: Message-ID: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Hello, The ExteranalData directory contains all the testing data both inputs and baselines. It's needed to run the testing suit to test your build. Brad On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet wrote: > Hi, > > I've just downloaded ITK source package from sourceforge and we're surprised by the size of the source tarball (more than 250Mo). > > Looking at the contain, it is due to a hidden directory (ExternalData) which contains only md5 sums. > > I don't think if it is really mandatory to compile the project from source and it would drastically decrease the size of the archive. > > Regards, > > -- > Manuel Grizonnet > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From dave.demarle at kitware.com Tue Mar 24 13:18:12 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Mar 2015 13:18:12 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: VTK provides External data as an optional download that expands into the right place in the source tree. If the user doesn't enable testing in cmake it isn't used, and if the user does enable testing but doesn't download the data tarball then the files are downloaded piecemeal. Some clever person could probably do the same thing for ITK. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp wrote: > Hello, > > The ExteranalData directory contains all the testing data both inputs and > baselines. It's needed to run the testing suit to test your build. > > Brad > > On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet > wrote: > > > Hi, > > > > I've just downloaded ITK source package from sourceforge and we're > surprised by the size of the source tarball (more than 250Mo). > > > > Looking at the contain, it is due to a hidden directory (ExternalData) > which contains only md5 sums. > > > > I don't think if it is really mandatory to compile the project from > source and it would drastically decrease the size of the archive. > > > > Regards, > > > > -- > > Manuel Grizonnet > > _______________________________________________ > > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Mar 24 13:24:58 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:24:58 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi, Since BUILD_TESTING is currently ON by default, we would want to change it to be OFF by default so default options work out-of-the-box. This change can be made, but it will require wrangling of dashboard build maintainers to add BUILD_TESTING=ON to their CTest scripts. Thanks, Matt On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle wrote: > VTK provides External data as an optional download that expands into the > right place in the source tree. If the user doesn't enable testing in cmake > it isn't used, and if the user does enable testing but doesn't download the > data tarball then the files are downloaded piecemeal. > > Some clever person could probably do the same thing for ITK. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> The ExteranalData directory contains all the testing data both inputs and >> baselines. It's needed to run the testing suit to test your build. >> >> Brad >> >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet >> wrote: >> >> > Hi, >> > >> > I've just downloaded ITK source package from sourceforge and we're >> > surprised by the size of the source tarball (more than 250Mo). >> > >> > Looking at the contain, it is due to a hidden directory (ExternalData) >> > which contains only md5 sums. >> > >> > I don't think if it is really mandatory to compile the project from >> > source and it would drastically decrease the size of the archive. >> > >> > Regards, >> > >> > -- >> > Manuel Grizonnet >> > _______________________________________________ >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From brad.king at kitware.com Tue Mar 24 13:32:17 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Mar 2015 13:32:17 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: <55119FA1.7040700@kitware.com> On 03/24/2015 01:24 PM, Matt McCormick wrote: > Since BUILD_TESTING is currently ON by default, we would want to > change it to be OFF by default so default options work out-of-the-box. > This change can be made, but it will require wrangling of dashboard > build maintainers to add BUILD_TESTING=ON to their CTest scripts. VTK solves this here: https://gitlab.kitware.com/vtk/vtk/blob/45af6f59/CMakeLists.txt#L267-276 BUILD_TESTING defaults to ON in version-controlled trees and defaults to OFF in tarball-extracted trees unless the data tarball has been extracted too. See the commit that added this behavior here: https://gitlab.kitware.com/vtk/vtk/commit/bf5cf3cf8f -Brad From jchris.fillionr at kitware.com Tue Mar 24 13:38:39 2015 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 24 Mar 2015 13:38:39 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi Matt, If you would have every machine specific dashboard script downloading a common driver script, you could simply ensure the BUILD_TESTING is set if not already defined ... Hth Jc On Tue, Mar 24, 2015 at 1:24 PM, Matt McCormick wrote: > Hi, > > Since BUILD_TESTING is currently ON by default, we would want to > change it to be OFF by default so default options work out-of-the-box. > This change can be made, but it will require wrangling of dashboard > build maintainers to add BUILD_TESTING=ON to their CTest scripts. > > Thanks, > Matt > > On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle > wrote: > > VTK provides External data as an optional download that expands into the > > right place in the source tree. If the user doesn't enable testing in > cmake > > it isn't used, and if the user does enable testing but doesn't download > the > > data tarball then the files are downloaded piecemeal. > > > > Some clever person could probably do the same thing for ITK. > > > > > > > > David E DeMarle > > Kitware, Inc. > > R&D Engineer > > 21 Corporate Drive > > Clifton Park, NY 12065-8662 > > Phone: 518-881-4909 > > > > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp < > blowekamp at mail.nih.gov> > > wrote: > >> > >> Hello, > >> > >> The ExteranalData directory contains all the testing data both inputs > and > >> baselines. It's needed to run the testing suit to test your build. > >> > >> Brad > >> > >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet > >> wrote: > >> > >> > Hi, > >> > > >> > I've just downloaded ITK source package from sourceforge and we're > >> > surprised by the size of the source tarball (more than 250Mo). > >> > > >> > Looking at the contain, it is due to a hidden directory (ExternalData) > >> > which contains only md5 sums. > >> > > >> > I don't think if it is really mandatory to compile the project from > >> > source and it would drastically decrease the size of the archive. > >> > > >> > Regards, > >> > > >> > -- > >> > Manuel Grizonnet > >> > _______________________________________________ > >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > >> > _______________________________________________ > >> > Community mailing list > >> > Community at itk.org > >> > http://public.kitware.com/mailman/listinfo/community > >> > >> _______________________________________________ > >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > > > > > > > _______________________________________________ > > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Mar 24 13:49:40 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:49:40 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: <55119FA1.7040700@kitware.com> References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> <55119FA1.7040700@kitware.com> Message-ID: Dave and Brad, Thanks for the suggestion! That looks like a great suggestion. I've created an issue as a reminder to implement for the next release: https://issues.itk.org/jira/browse/ITK-3355 Thanks, Matt On Tue, Mar 24, 2015 at 1:32 PM, Brad King wrote: > On 03/24/2015 01:24 PM, Matt McCormick wrote: >> Since BUILD_TESTING is currently ON by default, we would want to >> change it to be OFF by default so default options work out-of-the-box. >> This change can be made, but it will require wrangling of dashboard >> build maintainers to add BUILD_TESTING=ON to their CTest scripts. > > VTK solves this here: > > https://gitlab.kitware.com/vtk/vtk/blob/45af6f59/CMakeLists.txt#L267-276 > > BUILD_TESTING defaults to ON in version-controlled trees and > defaults to OFF in tarball-extracted trees unless the data > tarball has been extracted too. See the commit that added > this behavior here: > > https://gitlab.kitware.com/vtk/vtk/commit/bf5cf3cf8f > > -Brad > From matt.mccormick at kitware.com Tue Mar 24 13:52:28 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:52:28 -0400 Subject: [ITK-dev] [ITK] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi Jc, Yes, that is a good point. Unfortunately, our CTest script do not yet automatically update a driver script. I started to schedule dashboards with Jenkins, and the driver scripts automatically update in this case. After more testing, I will document this configuration so others can use this system, which is easier to set-up and maintain. Thanks, Matt On Tue, Mar 24, 2015 at 1:38 PM, Jean-Christophe Fillion-Robin wrote: > Hi Matt, > > If you would have every machine specific dashboard script downloading a > common driver script, you could simply ensure the BUILD_TESTING is set if > not already defined ... > > Hth > Jc > > > On Tue, Mar 24, 2015 at 1:24 PM, Matt McCormick > wrote: >> >> Hi, >> >> Since BUILD_TESTING is currently ON by default, we would want to >> change it to be OFF by default so default options work out-of-the-box. >> This change can be made, but it will require wrangling of dashboard >> build maintainers to add BUILD_TESTING=ON to their CTest scripts. >> >> Thanks, >> Matt >> >> On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle >> wrote: >> > VTK provides External data as an optional download that expands into the >> > right place in the source tree. If the user doesn't enable testing in >> > cmake >> > it isn't used, and if the user does enable testing but doesn't download >> > the >> > data tarball then the files are downloaded piecemeal. >> > >> > Some clever person could probably do the same thing for ITK. >> > >> > >> > >> > David E DeMarle >> > Kitware, Inc. >> > R&D Engineer >> > 21 Corporate Drive >> > Clifton Park, NY 12065-8662 >> > Phone: 518-881-4909 >> > >> > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp >> > >> > wrote: >> >> >> >> Hello, >> >> >> >> The ExteranalData directory contains all the testing data both inputs >> >> and >> >> baselines. It's needed to run the testing suit to test your build. >> >> >> >> Brad >> >> >> >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet >> >> wrote: >> >> >> >> > Hi, >> >> > >> >> > I've just downloaded ITK source package from sourceforge and we're >> >> > surprised by the size of the source tarball (more than 250Mo). >> >> > >> >> > Looking at the contain, it is due to a hidden directory >> >> > (ExternalData) >> >> > which contains only md5 sums. >> >> > >> >> > I don't think if it is really mandatory to compile the project from >> >> > source and it would drastically decrease the size of the archive. >> >> > >> >> > Regards, >> >> > >> >> > -- >> >> > Manuel Grizonnet >> >> > _______________________________________________ >> >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> >> > _______________________________________________ >> >> > Community mailing list >> >> > Community at itk.org >> >> > http://public.kitware.com/mailman/listinfo/community >> >> >> >> _______________________________________________ >> >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > >> > >> > >> > _______________________________________________ >> > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > > > > > -- > +1 919 869 8849 From matt.mccormick at kitware.com Tue Mar 24 13:56:30 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:56:30 -0400 Subject: [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th Message-ID: Hi, We will be upgrading the Gerrit instance on Thursday March, 24th starting at 10 AM Eastern US Time. The server will be unavailable for multiple hours while the upgrade is performed. Thank you for your patience. Matt From blowekamp at mail.nih.gov Wed Mar 25 08:30:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 25 Mar 2015 08:30:24 -0400 Subject: [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: References: Message-ID: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Matt, Great news! Sounds like something exciting and new is coming... Brad On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: > Hi, > > We will be upgrading the Gerrit instance on Thursday March, 24th > starting at 10 AM Eastern US Time. The server will be unavailable for > multiple hours while the upgrade is performed. > > Thank you for your patience. > > Matt > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers From s1471978 at sms.ed.ac.uk Wed Mar 25 07:59:44 2015 From: s1471978 at sms.ed.ac.uk (Tim Beattie) Date: Wed, 25 Mar 2015 11:59:44 +0000 Subject: [ITK-dev] Benchmarks for ITK Message-ID: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> Hi folks. Are there any readily-available benchmarks for the ITK project? I?m interested in porting some of the parallelised parts of ITK to SYCL in order to see how SYCL performs when compared to other parallel programming frameworks. I?ve had a brief look at the ITK code and some of the mailing list archives, but I haven?t found anything called a benchmark or which mentions performance. I know there are extensive unit tests and plenty of examples, but what I?m really looking for is a ?this is how we all benchmark it? program. Just in case anyone?s interested, this is for a masters dissertation in High Performance Computing at the University of Edinburgh. I?ll be running several medical imaging and robotic vision benchmarks on Xeon Phi hardware and possibly on AMD GPUs as well. Thanks in advance, Tim -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From matt.mccormick at kitware.com Wed Mar 25 09:45:00 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 09:45:00 -0400 Subject: [ITK-dev] ITK Dashboard failed In-Reply-To: <5512B705.1060208@ohio.edu> References: <5512B705.1060208@ohio.edu> Message-ID: Hi Kevin, Thanks for the note! This issue should be fixed with tomorrow's build: http://itk.org/gitweb?p=ITK.git;a=commit;h=5413fa6d13033ba586c16d08a912b7d4ed008585 Thanks, Matt On Wed, Mar 25, 2015 at 9:24 AM, Kevin H. Hobbs wrote: > My crontab script on bubbles does : > > # Update ITKScripts > cd /home/kevin/kitware/ITKScripts > git pull origin > > # Update ITK > echo "Update ITK" > cd /home/kevin/kitware/ > time $CTEST -S itk.cmake > date > > $CTEST is the nightly ctest > > Last night the output was : > > > >From git://itk.org/ITK > b1ff2b2..3426f95 dashboard -> origin/dashboard > Updating b1ff2b2..3426f95 > Fast-forward > itk_common.cmake | 8 +++++--- > jenkins_dashboard.cmake | 1 + > 2 files changed, 6 insertions(+), 3 deletions(-) > Update ITK > Dashboard script configuration: > CTEST_SITE=[bubbles.hooperlab] > CTEST_BUILD_NAME=[Fedora-19-x86_64_WrapITK] > CTEST_SOURCE_DIRECTORY=[/home/kevin/kitware/ITK] > CTEST_BINARY_DIRECTORY=[/home/kevin/kitware/ITK_Build] > ExternalData_OBJECT_STORES=[/home/kevin/kitware/ExternalData] > CTEST_CMAKE_GENERATOR=[Unix Makefiles] > CTEST_BUILD_CONFIGURATION=[Release] > CTEST_GIT_COMMAND=[/usr/bin/git] > CTEST_CHECKOUT_COMMAND=[] > CTEST_SCRIPT_DIRECTORY=[/home/kevin/kitware] > CTEST_USE_LAUNCHERS=[1] > CTEST_TEST_TIMEOUT=[1500] > CTEST_COVERAGE_ARGS=[] > CTEST_TEST_ARGS=[PARALLEL_LEVEL;8] > CTEST_MEMCHECK_ARGS=[PARALLEL_LEVEL;8] > > > Clearing build tree... > CMake Error at ITKScripts/itk_common.cmake:415 (if): > if given arguments: > > "NOT" "EXISTS" "/home/kevin/kitware/ITK_Build/CMakeCache.txt" "OR" > > Unknown arguments specified > Call Stack (most recent call first): > itk.cmake:48 (include) > > > > real 0m18.173s > user 0m0.120s > sys 0m2.112s > Wed Mar 25 00:16:02 EDT 2015 > From hobbsk at ohio.edu Wed Mar 25 09:24:21 2015 From: hobbsk at ohio.edu (Kevin H. Hobbs) Date: Wed, 25 Mar 2015 09:24:21 -0400 Subject: [ITK-dev] ITK Dashboard failed Message-ID: <5512B705.1060208@ohio.edu> My crontab script on bubbles does : # Update ITKScripts cd /home/kevin/kitware/ITKScripts git pull origin # Update ITK echo "Update ITK" cd /home/kevin/kitware/ time $CTEST -S itk.cmake date $CTEST is the nightly ctest Last night the output was : >From git://itk.org/ITK b1ff2b2..3426f95 dashboard -> origin/dashboard Updating b1ff2b2..3426f95 Fast-forward itk_common.cmake | 8 +++++--- jenkins_dashboard.cmake | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) Update ITK Dashboard script configuration: CTEST_SITE=[bubbles.hooperlab] CTEST_BUILD_NAME=[Fedora-19-x86_64_WrapITK] CTEST_SOURCE_DIRECTORY=[/home/kevin/kitware/ITK] CTEST_BINARY_DIRECTORY=[/home/kevin/kitware/ITK_Build] ExternalData_OBJECT_STORES=[/home/kevin/kitware/ExternalData] CTEST_CMAKE_GENERATOR=[Unix Makefiles] CTEST_BUILD_CONFIGURATION=[Release] CTEST_GIT_COMMAND=[/usr/bin/git] CTEST_CHECKOUT_COMMAND=[] CTEST_SCRIPT_DIRECTORY=[/home/kevin/kitware] CTEST_USE_LAUNCHERS=[1] CTEST_TEST_TIMEOUT=[1500] CTEST_COVERAGE_ARGS=[] CTEST_TEST_ARGS=[PARALLEL_LEVEL;8] CTEST_MEMCHECK_ARGS=[PARALLEL_LEVEL;8] Clearing build tree... CMake Error at ITKScripts/itk_common.cmake:415 (if): if given arguments: "NOT" "EXISTS" "/home/kevin/kitware/ITK_Build/CMakeCache.txt" "OR" Unknown arguments specified Call Stack (most recent call first): itk.cmake:48 (include) real 0m18.173s user 0m0.120s sys 0m2.112s Wed Mar 25 00:16:02 EDT 2015 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 173 bytes Desc: OpenPGP digital signature URL: From matt.mccormick at kitware.com Wed Mar 25 10:00:36 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 10:00:36 -0400 Subject: [ITK-dev] [ITK] Benchmarks for ITK In-Reply-To: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> References: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> Message-ID: Hi Tim, Thanks for reaching out to the list. Improvements in ITK's support for parallel processing and architectures would be greatly welcome. We currently have some support for OpenCL-based computing. However, if appropriate, addition of SYCL or better C++ programming capabilities would be welcome. Also, a port of the VTK SMPTools (see 'git grep SMPTools' within the VTK tree) would be a good way to allow better parallel computing in ITK. If you want to do a comparison for your thesis, there are a few backends there that could be compared to the ones you propose. Since ITK and VTK have a common ancestry in the multi-threading code, a similar update could be possible in the codebase. For benchmarks, I am hoping to try Air Speed Velocity [1] to track performance. We started a repository to add performance benchmarks [2] with real-world use cases, but it has yet to be populated. A good start for performance benchmarks may be some of the slower tests that currently exist in the test suite [3]. Thanks, Matt [1] https://spacetelescope.github.io/asv/index.html [2] https://github.com/InsightSoftwareConsortium/ITKPerformanceTests [3] http://kitware.com/blog/posts/view/556 On Wed, Mar 25, 2015 at 7:59 AM, Tim Beattie wrote: > Hi folks. > > Are there any readily-available benchmarks for the ITK project? I?m interested in porting some of the parallelised parts of ITK to SYCL in order to see how SYCL performs when compared to other parallel programming frameworks. I?ve had a brief look at the ITK code and some of the mailing list archives, but I haven?t found anything called a benchmark or which mentions performance. I know there are extensive unit tests and plenty of examples, but what I?m really looking for is a ?this is how we all benchmark it? program. > > Just in case anyone?s interested, this is for a masters dissertation in High Performance Computing at the University of Edinburgh. I?ll be running several medical imaging and robotic vision benchmarks on Xeon Phi hardware and possibly on AMD GPUs as well. > > Thanks in advance, > > Tim > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > _______________________________________________ > Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Wed Mar 25 10:01:33 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 10:01:33 -0400 Subject: [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> References: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Message-ID: Yes! Very exciting improvements are coming! More details will follow, soon. On Wed, Mar 25, 2015 at 8:30 AM, Bradley Lowekamp wrote: > Matt, > > Great news! Sounds like something exciting and new is coming... > > Brad > > On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: > >> Hi, >> >> We will be upgrading the Gerrit instance on Thursday March, 24th >> starting at 10 AM Eastern US Time. The server will be unavailable for >> multiple hours while the upgrade is performed. >> >> Thank you for your patience. >> >> Matt >> _______________________________________________ >> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers > From michkapopoff at gmail.com Thu Mar 26 16:46:57 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Thu, 26 Mar 2015 21:46:57 +0100 Subject: [ITK-dev] [ITK] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: References: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Message-ID: <1FDD819B-4093-4E51-BF58-3E7474C499CA@gmail.com> The new Gerrit is there ! Nice work ! Michka > On 25 Mar 2015, at 15:01, Matt McCormick wrote: > > Yes! Very exciting improvements are coming! > > More details will follow, soon. > > On Wed, Mar 25, 2015 at 8:30 AM, Bradley Lowekamp > wrote: >> Matt, >> >> Great news! Sounds like something exciting and new is coming... >> >> Brad >> >> On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: >> >>> Hi, >>> >>> We will be upgrading the Gerrit instance on Thursday March, 24th >>> starting at 10 AM Eastern US Time. The server will be unavailable for >>> multiple hours while the upgrade is performed. >>> >>> Thank you for your patience. >>> >>> Matt >>> _______________________________________________ >>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers >> > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Mon Mar 30 10:49:03 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 30 Mar 2015 10:49:03 -0400 Subject: [ITK-dev] Updates to Gerrit Robot Builds Message-ID: Hi folks, Along with our recent Gerrit upgrade, we have also re-worked and greatly improved the robot builds for proposed patches. The new system uses the Gerrit Trigger plugin for Jenkins. Two Jenkins instances currently will create robot builds, one on the Azure cloud for Linux and Windows builds [1] and one at Kitware for MacOSX builds. Improvements include: - More builds executors with a more reliable uptime. The Azure builds will now spin up and spin down on demand, and they stay up more reliably. We now have two full-time MacOSX build executors. - MacOSX builds are now running the latest version of XCode and generating fully green build results. - Remote Module submissions will have their module enabled during submission. - Builds report when they are finished and add a +1 or -1 Verified status automatically. It is much more useful to know when the builds finish as opposed to when the builds start. The notification makes is easier to know at a glance whether a patch builds cleanly. Links are included to filtered CDash build results. Links are also included to the Jenkins jobs on Azure, which has a useful link to the full console output. - New and more extensive build controls. The following comments will initiate builds: request build: all request build: windows request build: osx request build: linux request build: python The 'request build: all' comment will generate Windows, MacOSX, and Linux builds. The 'request build: python' comment will initiate builds with Python wrapping. These commands have been added and will be updated on the Git development wiki page [2] Happy testing :-), Matt [1] http://itkjenkins.cloudapp.net [2] http://www.itk.org/Wiki/ITK/Git/Develop