[Rd] Pivoting in chol

Jonathan Rougier J.C.Rougier@durham.ac.uk
Wed, 20 Feb 2002 11:16:54 +0000


Hi Brian,

Prof Brian Ripley wrote:

> I think our general policy is to move towards using LAPACK for its
> superior algorithms and better use of enhanced BLAS routines.  Is there a
> suitable LAPACK alternative: my LAPACK manual is in my office and I am
> not? (We are also tending to use .Call rather than .Fortran/.C to control
> better the making of copies.)

The Lapack routine is "dpotrf", which does not pivot: I searched netlib
for all the words "cholesky lapack double pivot" and drew a blank.

> We can't remove LINPACK routines which are in include/R_ext/Linpack.h:
> packages might well rely on them, see R-exts.texi.

That's true -- I'll put them back!

Cheers, Jonathan.

> On Wed, 20 Feb 2002, Jonathan Rougier wrote:
> 
> > Hi Everyone,
> >
> > I have modified my version of R-1.4.1 to include choleski with pivoting
> > (like in Splus).  I thought R-core might consider including this in the
> > next version of R, so I give below the steps required to facilitate
> > this.
> >
> > 1. Copied Linpack routine "dchdc.f" into src/appl
> >
> > 2. Inserted line F77_SUBROUTINE(dchdc) in src/appl/ROUTINES
> >
> > 3. Inserted "dchdc.f" into SOURCES_F in appl/Makefile.in
> >
> > 4. Modifed src/library/base/R/chol.R (attached) and
> > src/library/base/man/chol.Rd (also attached)
> >
> > 5. Tidied up.  Removed "chol.f", "dpoco.f" and "dposl.f" from
> > src/appl/Makefile.in, src/appl/ROUTINES, src/include/R_ext/Applic.h,
> > src/include/R_ext/Linpack.h, src/unix/FFDecl.h and src/unix/FFTab.h.
> >
> > 6. Note: Cannot remove "dpofa.f" because it is used in "lbfgsb.c".
> >
> > I was following my nose a bit during this process.  Everything seems to
> > be OK but if I have done something drastic I would appreciate it if
> > someone could tell me!
> >
> > Cheers, Jonathan.
> > --
> > Jonathan Rougier                       Science Laboratories
> > Department of Mathematical Sciences    South Road
> > University of Durham                   Durham DH1 3LE
> > tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388
> > http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html
> 
> --
> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-- 
Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE
tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388
http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._