Search Mailing List Archives
[farmshare-discuss] error in R installation on farmshare (corn)?
Jason Bishop
bishopj at stanford.edu
Mon Dec 17 18:42:12 PST 2012
In general, I would suggest using the locally maintained R if you are a heavy R user.
In this case, locally maintained R works for test case. thank you Adrian.
jason
bishopj at corn20:~$ module load R-2.15.1-precise
bishopj at corn20:~$ cat lapack.r
data(iris)
zz = lm(Sepal.Length ~., data = iris)
summary(zz)
bishopj at corn20:~$ R --no-save < lapack.r
R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> data(iris)
> zz = lm(Sepal.Length ~., data = iris)
> summary(zz)
Call:
lm(formula = Sepal.Length ~ ., data = iris)
Residuals:
Min 1Q Median 3Q Max
-0.79424 -0.21874 0.00899 0.20255 0.73103
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.17127 0.27979 7.760 1.43e-12 ***
Sepal.Width 0.49589 0.08607 5.761 4.87e-08 ***
Petal.Length 0.82924 0.06853 12.101 < 2e-16 ***
Petal.Width -0.31516 0.15120 -2.084 0.03889 *
Speciesversicolor -0.72356 0.24017 -3.013 0.00306 **
Speciesvirginica -1.02350 0.33373 -3.067 0.00258 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3068 on 144 degrees of freedom
Multiple R-squared: 0.8673, Adjusted R-squared: 0.8627
F-statistic: 188.3 on 5 and 144 DF, p-value: < 2.2e-16
>
>
----- Original Message -----
From: "Adrian Albert" <adalbert at stanford.edu>
To: "bishopj" <bishopj at stanford.edu>, "Open discussion for users of FarmShare" <farmshare-discuss at lists.stanford.edu>
Sent: Monday, December 17, 2012 6:21:48 PM
Subject: Re: [farmshare-discuss] error in R installation on farmshare (corn)?
Thanks all for the replies!
Here are the R commands that induce the error on my corn account:
data(iris)
zz = lm(Sepal.Length ~., data = iris)
summary(zz)
Note that this happens when using the default R available on the corn machines. To make that go away I found two solutions:
1 ) I installed R from the sources in my home directory, ran that local copy, and the error disappeared. A bit of a hack though.
2) I typed
module load R.2.15.1-precise
and then started R, as describe in https://www.stanford.edu/group/farmshare/cgi-bin/wiki/index.php/R
Cheers,
Adrian
On Mon, Dec 17, 2012 at 5:31 PM, bishopj < bishopj at stanford.edu > wrote:
Can somebody post an r script which reproduces the error.
Thanks
-------- Original message --------
From: Duncan Gillespie < d.gillespie at stanford.edu >
Date: 12/17/2012 5:20 PM (GMT-08:00)
To: Open discussion for users of FarmShare < farmshare-discuss at lists.stanford.edu >
Subject: Re: [farmshare-discuss] error in R installation on farmshare (corn)?
This looks like a problem I had too and, although I don't know for sure, concluded it was due to an error in the path that R uses to find a required library or part of a library. I solved it by installing a local version of R in my home directory and using that instead of the central installation. That seemed to overcome the inconsistency producing the error.
Duncan
On 17 Dec 2012, at 17:09, Adrian Albert wrote:
Hello,
perhaps some of the R wizards on this list can help me with the following error. I connect to corn via ssh -X, I start R in command line, then try to do a very simple linear regression using lm(). However it seems that the R installation on farmshare is broken? It seems not to find lapack.so, which lm needs to perform a Cholesky inversion! Anyone knows why that is the case ? I attach a code snippet below.
Thanks!
Adrian
> data(iris)
> head(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa
>
> zz = lm(Sepal.Length ~., data = iris)
> summary(zz)
Error in chol2inv(Qr$qr[p1, p1, drop = FALSE]) :
lapack routines cannot be loaded
In addition: Warning message:
In chol2inv(Qr$qr[p1, p1, drop = FALSE]) :
unable to load shared object '/usr/lib/R/modules//lapack.so':
/usr/lib/R/modules//lapack.so: undefined symbol: dpstrf_
>
--
---------------------------------------------------------------------
Adrian Albert
PhD Candidate, Electrical Engineering
Stanford University
Tel.: 001 510 213 1220
email: adalbert at stanford.edu
web: www.stanford.edu/~adalbert
_______________________________________________
farmshare-discuss mailing list
farmshare-discuss at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/farmshare-discuss
_______________________________________________
farmshare-discuss mailing list
farmshare-discuss at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/farmshare-discuss
--
---------------------------------------------------------------------
Adrian Albert
PhD Candidate, Electrical Engineering
Stanford University
Tel.: 001 510 213 1220
email: adalbert at stanford.edu
web: www.stanford.edu/~adalbert
More information about the farmshare-discuss
mailing list