From: Brad King <brad.king@ki...>  20101220 13:13:33

On 12/17/2010 06:20 AM, Peter Vanroose wrote: > Thanks, Michael! > Looks perfect. Also the way you added the new netlib files. Yes, very nice. FYI, I committed one fix as r30525 with the patch below. Otherwise these source files do not compile without f2c installed on the system, or get the correct header when f2c is installed. Brad Index: timing_com.c ===================================================================  timing_com.c (revision 30524) +++ timing_com.c (working copy) @@ 1,4 +1,4 @@ #include "f2c.h" +#include "v3p_f2c.h" #ifdef __cplusplus extern "C" { Index: debug_com.c ===================================================================  debug_com.c (revision 30524) +++ debug_com.c (working copy) @@ 1,4 +1,4 @@ #include "f2c.h" +#include "v3p_f2c.h" #ifdef __cplusplus extern "C" { 
From: Peter Vanroose <peter_vanroose@ya...>  20101005 20:02:06

Michael, As to your questions: 1) In the past, we have just added the needed routines to netlib : an as minimal set as possible. 2) The Fortran source programs (also stored in v3p/netlib) have been "manually" converted from the .f by using f2c, in a threadsafe manner. Sources have been modified to use the v3p_*.h headers. Types and function names are prefixed with v3p_netlib_ . See v3p/netlib/README for the detailed procedure to follow. This setup documentation was written by Brad King (brad.king@...), so please contact him for any further details regarding the conversion etc. For the step towards vnl_algo (and C++), I'd say; design a "good" userfriendly interface, implementing the methods in a way similar to what was done for the other similar vnl_algo classes. As far as licenses are concerned: I suppose that a BSDstyle license is certainly compatible with the vxl license (and its usage); but some people on the vxl maintainers list can be more specific on this.  Peter. Michael Bowers wrote: > My name is Michael Bowers and I am at Johns Hopkins's > Center for Imaging Science. I've been using vxl for about > 5 years now on its own and via the Insight Tool Kit. > Vxl is sufficient for most of what I do and of course > it's a great package. > > I need a generalized sparse symmetric eigensystem > class. Are there plans to add one to vnl_algo in > the near future? Do you think it would be a great > deal of work? If there aren't resources there to > do it I might be able to contribute one with a little > guidance. > [...] > 1) ARPACK  http://www.caam.rice.edu/software/ARPACK/. > ARPACK software is capable of solving large scale symmetric, > nonsymmetric, and generalized eigenproblems from significant > application areas. > It has a C++ interface called ARPACK++. I've used ARPACK++, > but it includes a lot of dependencies. > > 2) Lanz  Order code that solves the large, sparse, > symmetric generalized eigenproblem. > > 3) Lanczos  Linear algebra routines with a nonGPL, > nonBSD type license. > > What is the general approach when adding netlib code? > > 1) Is the whole library generally added, or just the > routines necessary? > 2) Is the code converted from FORTRAN to c by hand? > > I'd like to add the sparse, generalized, eigenproblem to > vnl_algo. I'd appreciate any thoughts/guidance on the > process you have for me. 
From: Michael Bowers <mbowers@ci...>  20101007 19:57:01

Lianqing, I think what you described is what I have in mind. The natural place for the routine is inside vnl_sparse_symmetric_matrix, possibly as an overloaded CalculateNPairs method. We could use Strategy presumably, though currently the class doesn't hide the interface to dnlaso for the special case. What sort of collaboration do you propose? Mike B. Original Message From: Lianqing [mailto:yulq@...] Sent: Thursday, October 07, 2010 12:55 PM To: Michael Bowers Subject: Re: [Vxlmaintainers] generalized sparse symmetric eigensystem ?Michael, Thanks for your reply. Why not to be aggressive and post a proposal to the VXL maintainers list to start a collaboration on a generalized implementation of vnl_sparse_symmetric_eigensystem? I am sure lots of people need this feature very much. The choice of thirdparty code should not be an issue as strategy pattern can be used to replace one with another. I'm interested in this effort and would like to be involved. Lianqing  From: "Michael Bowers" <mbowers@...> Sent: Thursday, October 07, 2010 2:13 AM To: "'YuLianqing'" <yulq@...> Subject: RE: [Vxlmaintainers] generalized sparse symmetric eigensystem > > Lianqing, > > The vnl_sparse_symmetric_eigensystem class solves the special case of the > eigenproblem > > A * x = lambda * x > > For processing I am building I need to solve the general case of the > problem > > A * x = lambda * B * x > > The netlib code used by vnl_sparse_symmetric_eigensystem is from the LASO > library, which doesn't solve the general case of the problem. ARPACK > provides a solution that is robust (MATLAB uses it). > > Let me know what you think please. > > Thanks, > > Michael > > > > Original Message > From: YuLianqing [mailto:yulq@...] > Sent: Wednesday, October 06, 2010 1:15 PM > To: mbowers@... > Subject: RE: [Vxlmaintainers] generalized sparse symmetric eigensystem > > > > Hi, Michael, > > I notice that there is already a class named > vnl_sparse_symmetric_eigensystem in vnl_algo and used this class. Does it > meet your need? If not, could you tell me what's the limitation of this > class or what's your particular requirement? > > Lianqing Yu > >  >> Date: Tue, 5 Oct 2010 21:01:59 +0100 >> From: peter_vanroose@... >> To: mbowers@... >> CC: vxlmaintainers@... >> Subject: Re: [Vxlmaintainers] generalized sparse symmetric eigensystem >> >> Michael, >> >> As to your questions: >> 1) In the past, we have just added the needed routines to netlib : >> an as minimal set as possible. >> 2) The Fortran source programs (also stored in v3p/netlib) have been >> "manually" converted from the .f by using f2c, in a threadsafe >> manner. Sources have been modified to use the v3p_*.h headers. >> Types and function names are prefixed with v3p_netlib_ . >> See v3p/netlib/README for the detailed procedure to follow. >> This setup documentation was written by Brad King >> (brad.king@...), > so please contact him for any further details regarding the conversion > etc. >> >> For the step towards vnl_algo (and C++), I'd say; design a "good" > userfriendly interface, implementing the methods in a way similar to what > was done for the other similar vnl_algo classes. >> >> As far as licenses are concerned: I suppose that a BSDstyle license is > certainly compatible with the vxl license (and its usage); but some people > on the vxl maintainers list can be more specific on this. >> >>  Peter. >> >> >> Michael Bowers wrote: >>> My name is Michael Bowers and I am at Johns Hopkins's >>> Center for Imaging Science. I've been using vxl for about >>> 5 years now on its own and via the Insight Tool Kit. >>> Vxl is sufficient for most of what I do and of course >>> it's a great package. >>> >>> I need a generalized sparse symmetric eigensystem >>> class. Are there plans to add one to vnl_algo in >>> the near future? Do you think it would be a great >>> deal of work? If there aren't resources there to >>> do it I might be able to contribute one with a little >>> guidance. >>> [...] >>> 1) ARPACK  http://www.caam.rice.edu/software/ARPACK/. >>> ARPACK software is capable of solving large scale symmetric, >>> nonsymmetric, and generalized eigenproblems from significant >>> application areas. >>> It has a C++ interface called ARPACK++. I've used ARPACK++, >>> but it includes a lot of dependencies. >>> >>> 2) Lanz  Order code that solves the large, sparse, >>> symmetric generalized eigenproblem. >>> >>> 3) Lanczos  Linear algebra routines with a nonGPL, >>> nonBSD type license. >>> >>> What is the general approach when adding netlib code? >>> >>> 1) Is the whole library generally added, or just the >>> routines necessary? >>> 2) Is the code converted from FORTRAN to c by hand? >>> >>> I'd like to add the sparse, generalized, eigenproblem to >>> vnl_algo. I'd appreciate any thoughts/guidance on the >>> process you have for me. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >  >  >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today. >> http://p.sf.net/sfu/beautyoftheweb >> _______________________________________________ >> Vxlmaintainers mailing list >> Vxlmaintainers@... >> https://lists.sourceforge.net/lists/listinfo/vxlmaintainers > > > 
From: Michael Bowers <mbowers@ci...>  20101214 20:44:04
Attachments:
SSE.diff.gz

Dear Vxl Maintainers, I've created a first cut of a generalized sparse symmetric eigensystem solver in vxl. Essentially it consists of an additional method in vnl_sparse_symmetric_eigensystem: int CalculateNPairs(vnl_sparse_matrix<double>& A, vnl_sparse_matrix<double>& B, int nEV, double tolerance = 0, int numberLanczosVecs = 0, bool smallest = false, bool magnitude = true, int maxIterations = 0, double sigma = 0.0); It's based on ARPACK, which required a number of new ARPACK and LAPACK code conversions. It performs either the standard (DSAUPD mode 2) or the shiftandinvert (mode 3) solution of the problem: A * x = lambda * B * x where A and B are sparse and symmetric. B is positive definite. As stated above, it's a first draft. An issue I didn't address is thread safety of the f2c converted routines. ARPACK uses a "reverse communication interface" process which might complicate the problem. I'm attaching a patch file created from the current svn repository. Please check it out and forward any comments. Thank you, Michael Bowers Original Message From: Peter Vanroose [mailto:peter_vanroose@...] Sent: Tuesday, October 05, 2010 4:02 PM To: Michael Bowers Cc: Gehua Yang; vxl maintainers Subject: Re: generalized sparse symmetric eigensystem Michael, As to your questions: 1) In the past, we have just added the needed routines to netlib : an as minimal set as possible. 2) The Fortran source programs (also stored in v3p/netlib) have been "manually" converted from the .f by using f2c, in a threadsafe manner. Sources have been modified to use the v3p_*.h headers. Types and function names are prefixed with v3p_netlib_ . See v3p/netlib/README for the detailed procedure to follow. This setup documentation was written by Brad King (brad.king@...), so please contact him for any further details regarding the conversion etc. For the step towards vnl_algo (and C++), I'd say; design a "good" userfriendly interface, implementing the methods in a way similar to what was done for the other similar vnl_algo classes. As far as licenses are concerned: I suppose that a BSDstyle license is certainly compatible with the vxl license (and its usage); but some people on the vxl maintainers list can be more specific on this.  Peter. Michael Bowers wrote: > My name is Michael Bowers and I am at Johns Hopkins's > Center for Imaging Science. I've been using vxl for about > 5 years now on its own and via the Insight Tool Kit. > Vxl is sufficient for most of what I do and of course > it's a great package. > > I need a generalized sparse symmetric eigensystem > class. Are there plans to add one to vnl_algo in > the near future? Do you think it would be a great > deal of work? If there aren't resources there to > do it I might be able to contribute one with a little > guidance. > [...] > 1) ARPACK  http://www.caam.rice.edu/software/ARPACK/. > ARPACK software is capable of solving large scale symmetric, > nonsymmetric, and generalized eigenproblems from significant > application areas. > It has a C++ interface called ARPACK++. I've used ARPACK++, > but it includes a lot of dependencies. > > 2) Lanz  Order code that solves the large, sparse, > symmetric generalized eigenproblem. > > 3) Lanczos  Linear algebra routines with a nonGPL, > nonBSD type license. > > What is the general approach when adding netlib code? > > 1) Is the whole library generally added, or just the > routines necessary? > 2) Is the code converted from FORTRAN to c by hand? > > I'd like to add the sparse, generalized, eigenproblem to > vnl_algo. I'd appreciate any thoughts/guidance on the > process you have for me. 
From: Peter Vanroose <peter_vanroose@ya...>  20101217 11:20:45

Thanks, Michael! Looks perfect. Also the way you added the new netlib files. I've just committed your changes to the SVN repository, which will make it easier for others to try it out and come back with comments. (Especially w.r.t. the thread safety issues of arpack.)  Peter. > Från: Michael Bowers <mbowers@...> > Ämne: Re: generalized sparse symmetric eigensystem > Datum: tisdag 14 december 2010 20:43 > > > Dear Vxl Maintainers, > > I've created a first cut of a generalized sparse symmetric > eigensystem solver in vxl. Essentially it consists of an > additional method in vnl_sparse_symmetric_eigensystem: > > int CalculateNPairs(vnl_sparse_matrix<double>& A, > vnl_sparse_matrix<double>& B, > int nEV, double tolerance = 0, > int numberLanczosVecs = 0, > bool smallest = false, > bool magnitude = true, > int maxIterations = 0, > double sigma = 0.0); > > It's based on ARPACK, which required a number of new ARPACK > and LAPACK code conversions. It performs either the standard > (DSAUPD mode 2) or the shiftandinvert (mode 3) solution of > the problem: > > A * x = lambda * B * x > > where A and B are sparse and symmetric. B is positive > definite. > > As stated above, it's a first draft. An issue I > didn't address is thread safety of the f2c converted > routines. ARPACK uses a "reverse communication > interface" process which might complicate the problem. > > I'm attaching a patch file created from the current svn > repository. Please check it out and forward any comments. > > Thank you, > > Michael Bowers 
From: Brad King <brad.king@ki...>  20101220 13:13:33

On 12/17/2010 06:20 AM, Peter Vanroose wrote: > Thanks, Michael! > Looks perfect. Also the way you added the new netlib files. Yes, very nice. FYI, I committed one fix as r30525 with the patch below. Otherwise these source files do not compile without f2c installed on the system, or get the correct header when f2c is installed. Brad Index: timing_com.c ===================================================================  timing_com.c (revision 30524) +++ timing_com.c (working copy) @@ 1,4 +1,4 @@ #include "f2c.h" +#include "v3p_f2c.h" #ifdef __cplusplus extern "C" { Index: debug_com.c ===================================================================  debug_com.c (revision 30524) +++ debug_com.c (working copy) @@ 1,4 +1,4 @@ #include "f2c.h" +#include "v3p_f2c.h" #ifdef __cplusplus extern "C" { 
From: Chuck Atkins <chuck.atkins@ki...>  20101006 01:44:18
Attachments:
Message as HTML

I believe SuperLU may be a better candidate for this over ARPACK since it's already a C library. Chuck Atkins R&D Engineer, Kitware, Inc. (518) 3713971 x603 chuck.atkins@...  "Mathematicians are tools for turning coffee grounds into formulas.", Paul Erdos On Tue, Oct 5, 2010 at 4:01 PM, Peter Vanroose <peter_vanroose@...>wrote: > Michael, > > As to your questions: > 1) In the past, we have just added the needed routines to netlib : > an as minimal set as possible. > 2) The Fortran source programs (also stored in v3p/netlib) have been > "manually" converted from the .f by using f2c, in a threadsafe > manner. Sources have been modified to use the v3p_*.h headers. > Types and function names are prefixed with v3p_netlib_ . > See v3p/netlib/README for the detailed procedure to follow. > This setup documentation was written by Brad King (brad.king@...), > so please contact him for any further details regarding the conversion etc. > > For the step towards vnl_algo (and C++), I'd say; design a "good" > userfriendly interface, implementing the methods in a way similar to what > was done for the other similar vnl_algo classes. > > As far as licenses are concerned: I suppose that a BSDstyle license is > certainly compatible with the vxl license (and its usage); but some people > on the vxl maintainers list can be more specific on this. > >  Peter. > > > Michael Bowers wrote: > > My name is Michael Bowers and I am at Johns Hopkins's > > Center for Imaging Science. I've been using vxl for about > > 5 years now on its own and via the Insight Tool Kit. > > Vxl is sufficient for most of what I do and of course > > it's a great package. > > > > I need a generalized sparse symmetric eigensystem > > class. Are there plans to add one to vnl_algo in > > the near future? Do you think it would be a great > > deal of work? If there aren't resources there to > > do it I might be able to contribute one with a little > > guidance. > > [...] > > 1) ARPACK  http://www.caam.rice.edu/software/ARPACK/. > > ARPACK software is capable of solving large scale symmetric, > > nonsymmetric, and generalized eigenproblems from significant > > application areas. > > It has a C++ interface called ARPACK++. I've used ARPACK++, > > but it includes a lot of dependencies. > > > > 2) Lanz  Order code that solves the large, sparse, > > symmetric generalized eigenproblem. > > > > 3) Lanczos  Linear algebra routines with a nonGPL, > > nonBSD type license. > > > > What is the general approach when adding netlib code? > > > > 1) Is the whole library generally added, or just the > > routines necessary? > > 2) Is the code converted from FORTRAN to c by hand? > > > > I'd like to add the sparse, generalized, eigenproblem to > > vnl_algo. I'd appreciate any thoughts/guidance on the > > process you have for me. > > > > > > > > > > > > > > > > > > > >  > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Vxlmaintainers mailing list > Vxlmaintainers@... > https://lists.sourceforge.net/lists/listinfo/vxlmaintainers > 