RE: [R] eigenvalues of a circulant matrix

From: Globe Trotter <>
Date: Wed 04 May 2005 - 14:07:24 EST

> Under Linux run "ldd" on the binary to see what shared libraries the binary
> has been linked against and will attempt to load. The command you run is a
> shell script which sets and exports LD_LIBRARY_PATH and then runs R, so to
> be sure first start R and execute
> > system("echo $LD_LIBRARY_PATH")


> and then using this value for LD_LIBRARY_PATH do
> $ export LD_LIBRARY_PATH=<R's value for this>

I use tcsh, so had to switch to bash to use export....

> $ ldd `R RHOME`/bin/exec/R
  => /usr/lib/ (0x00995000) => /usr/lib/ (0x0068f000) => /lib/tls/ (0x00664000) => /lib/ (0x00dd1000) => /usr/lib/ (0x00d3d000) => /usr/lib/ (0x03d2f000) => /lib/ (0x00689000) => /lib/tls/ (0x00538000)
        /lib/ (0x0051e000)

> which will list the shared libraries R will try to load to resolve links to
> shared libraries.
> Having said that, I have tried your example on several platforms with
> several configurations, and I get NaNs only when R is calling the Lapack
> routine dsyevr (R's builtin Lapack) with an external (optimized) blas
> (either Goto or ATLAS's blas) but not R's builtin blas. Moreover even with
> the optimized blas, if I use dysev instead of dsyevr, (eigen() executes a
> .Call("La_rs",x,only.values,"dsyevr",PACKAGE="base"), I execute this from R
> with "dsyev" in place of "dsyevr") I get no NaNs.
> So it looks like a problem with a blas routine used by dsyevr but not dsyev,
> but I have yet to confirm.

Well, I have now written a test function in C to call dsyevr, but it goes through fine -- no NaN's. (I can send the test function).

I wonder if there is an issue with workspace allocation in R: dsyevr has an optimal way of doing that, and that is obtained by a call with iwork=-1.

Many thanks and best wishes!

> I note that your C program does not use either of these lapack routines.
> Reid Huntsinger
> mailing list PLEASE do read the posting guide! Received on Wed May 04 14:12:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:33 EST