I am grateful for the advice of Douglas Bates on my earlier problem in making R-0.62.1, but I'm afraid I'm still having problems.... I have been installing the various updates to R for quite some time on my alpha, and it is only now that I have been having really severe problems. The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I needed to install GNU make. For 0.62.2 I have so far needed to (a) edit the Makefile in src/graphics, as mentioned in my previous email (b) edit the config.site to give a -fpe3 flag to the DEC f90 compiler (this is more a precaution in case of fp exceptions in the fortran code) (c) edit the Makeconf file to explicitly give "-nofor_main -fpe3" flags to f90 in LDCMD (because it doesn't seem to be accepted when put in config.site) (d) install GNU install (suggested by Douglas Bates) this then produces a successful "make" Following my previous practice I then make a symbolic link to R from /usr/local/bin. However when I then run R I get. ...opening messages... Error: memory exhausted> 1+1[1] 2> a <- c(1,2,3,4) > a[1] 1 2 3 4> help()Error: Object ".Library" not found> help(c)Error: Object ".lib.loc" not found I don't recall having this before. Obviously it is unable to find various things. So I thought something might have changed from previous versions, so I did "make install" which I have tended not to do before. When I did this I got group/ownership errors with tar and the make failed. So then (following the previous patterns) I installed GNU tar. "make install" then worked fine, But I still get the same problems when trying to run R. I think I'm almost there....Any ideas ? Best wishes, Mark Mark A. Beaumont Institute of Zoology Zoological Society of London Regent's Park London NW1 4RY UK Tel: 0171 449 6617 Fax: 0171 586 2870 m.beaumont at ucl.ac.uk -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Mark A. Beaumont" <M.Beaumont at ucl.ac.uk> writes:> Following my previous practice I then make a symbolic link to R from > /usr/local/bin. However when I then run R I get.> > ...opening messages... > > Error: memory exhausted > > 1+1 > [1] 2 > > a <- c(1,2,3,4) > > a > [1] 1 2 3 4 > > help() > Error: Object ".Library" not found > > help(c) > Error: Object ".lib.loc" not found >Some thing is clearly going wrong during the reading of the init code. The question is "where?". It *is* a bit of a design problem in R that that isn't readily seen. It could be in the reading of $RHOME/library/base/R/base which you might want to check looks reasonable. You could also try to run (from the top level of the R source tree) something like R> source('library/base/R/base',echo=T) which should rerun the init code, but with echoing turned on, so that if it stops prematurely, you'll know why. It is somewhat unlikely that the base file should be the culprit, though, because it only defines a bunch of functions without actually executing anything except "<-". Perhaps something in the system Rprofile is doing you in. Again, try sourcing it with echo on. In particular, might there be a problem with getenv() on your system? Just to be sure, also check for stray .RData and .Rprofile files. If the former exists and is too large, that would explain it all by itself... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Mark A. Beaumont" <M.Beaumont at ucl.ac.uk> writes:> I am grateful for the advice of Douglas Bates on my earlier problem in making > R-0.62.1, but I'm afraid I'm still having problems.... > > I have been installing the various updates to R for quite some time on my > alpha, and it is only now that I have been having really severe problems. > > The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I > needed to install GNU make. > > For 0.62.2 I have so far needed to > (a) edit the Makefile in src/graphics, as mentioned in my previous email > > (b) edit the config.site to give a -fpe3 flag to the DEC f90 compiler (this > is more a precaution in case of fp exceptions in the fortran code) > > (c) edit the Makeconf file to explicitly give "-nofor_main -fpe3" flags to > f90 in LDCMD (because it doesn't seem to be accepted when put in > config.site) > > (d) install GNU install (suggested by Douglas Bates) > > this then produces a successful "make" > > Following my previous practice I then make a symbolic link to R from > /usr/local/bin. However when I then run R I get.>From 0.62 onward you should not have to create a symbolic link in/usr/local/bin. It should be that you can run cd $RSOURCE ./configure --prefix=/usr/local make install and you will end up with the R script installed in /usr/local/bin and all the files needed to run R in /usr/local/lib/R. Can you tell what the prefix is set to after you run ./configure? BTW, the reason for these changes is to bring R more closely in line with the coding standards for GNU. It is very helpful to be able to have the sources in one directory but make the installation in another directory, especially in a multi-architecture environment. -- Douglas Bates bates at stat.wisc.edu Statistics Department 608/262-2598 University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 1 Jul 1998, Mark A. Beaumont wrote:> I have been installing the various updates to R for quite some time on my > alpha, and it is only now that I have been having really severe problems. > > The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I > needed to install GNU make. > > For 0.62.2 I have so far needed to > (a) edit the Makefile in src/graphics, as mentioned in my previous email > > (b) edit the config.site to give a -fpe3 flag to the DEC f90 compiler (this > is more a precaution in case of fp exceptions in the fortran code) > > (c) edit the Makeconf file to explicitly give "-nofor_main -fpe3" flags to > f90 in LDCMD (because it doesn't seem to be accepted when put in > config.site) > > (d) install GNU install (suggested by Douglas Bates) > > this then produces a successful "make" >All my attempts to get R with version nuber > 0.61.1 running on the alpha failed too , with similar errors after startup as you get. Now I tried the same compilation procedure as you with 0.62.1 on my alpha (with DU 4.0D and DEC Fortran (f77) 5.0) and my resulting binary produces correct results for your tests, but gives other curios results:> 1:3[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15> seq(1,5,by=0.2)[1] 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8> seq(1,5)[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15> seq(1,20)[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15> seq(1,5,length=4)[1] 1.000000 2.333333 3.666667 5.000000 6.333333 7.666667 9.000000 [8] 10.333333 11.666667 13.000000 14.333333 15.666667 17.000000 18.333333 [15] 19.666667 21.000000 5.000000 I guess this behavior causes man problems, because many functions generate internally some index vectors with seq(). This was also my first guess after my troubles with R 0.61.2 and R 0.61.3 and the alpha. Albrecht ------------------------------------------------------------------------------ Albrecht Gebhardt email: albrecht.gebhardt at uni-klu.ac.at Institut fuer Mathematik Tel. : (++43 463) 2700/837 Universitaet Klagenfurt Fax : (++43 463) 2700/834 Villacher Str. 161 WWW : http://www-stat.uni-klu.ac.at/~agebhard A-9020 Klagenfurt, Austria ------------------------------------------------------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
With gdb I get now (breakpoint in seq(), R command was "> 1:3") some variables: Note the value of "n" ! ################### gdb display: ###################################### (gdb) 10: n = 1079069593 9: *s2 = {sxpinfo = {type = 14, obj = 0, named = 0, gp = 0, mark = 0, debug = 0, trace = 0, = 0}, attrib = 0x14005a8a0, u = {vecsxp = { length = 1, type = {c = 0x1408362a0 "", i = 0x1408362a0, f = 0x1408362a0, z = 0x1408362a0, s = 0x1408362a0}}, primsxp = { offset = 1}, symsxp = {pname = 0x100000001, value = 0x1408362a0, internal = 0x14005a8a0}, listsxp = {carval = 0x100000001, cdrval = 0x1408362a0, tagval = 0x14005a8a0}, envsxp = { frame = 0x100000001, enclos = 0x1408362a0}, closxp = { formals = 0x100000001, body = 0x1408362a0, env = 0x14005a8a0}, promsxp = {value = 0x100000001, expr = 0x1408362a0, env 0x14005a8a0}}} 8: *s1 = {sxpinfo = {type = 14, obj = 0, named = 0, gp = 0, mark = 0, debug = 0, trace = 0, = 0}, attrib = 0x14005a8a0, u = {vecsxp = { length = 1, type = {c = 0x140836290 "", i = 0x140836290, f = 0x140836290, z = 0x140836290, s = 0x140836290}}, primsxp = { offset = 1}, symsxp = {pname = 0x100000001, value = 0x140836290, internal = 0x14005a8a0}, listsxp = {carval = 0x100000001, cdrval = 0x140836290, tagval = 0x14005a8a0}, envsxp = { frame = 0x100000001, enclos = 0x140836290}, closxp = { formals = 0x100000001, body = 0x140836290, env = 0x14005a8a0}, promsxp = {value = 0x100000001, expr = 0x140836290, env 0x14005a8a0}}} 7: n2 = 3 6: n1 = 1 ################### end of gdb display ################################### The display above is the state AFTER the line marked with "--->>" ################### part of src/main/seq.c ########################### static SEXP seq(SEXP call, SEXP s1, SEXP s2) { int i, n, in1; double n1, n2; SEXP ans; n1 = length(s1); n2 = length(s1); if(n1 > 1 || n2 > 1) { n = (n1 > n2) ? n1 : n2; warningcall(call, "Numerical expression has %d elements: only the first used\n", n); } n1 = asReal(s1); n2 = asReal(s2); if (ISNAN(n1) || ISNAN(n2)) errorcall(call, "NA/NaN argument\n"); if (n1 <= INT_MIN || n2 <= INT_MIN || n1 > INT_MAX || n2 > INT_MAX || abs(n2 - n1) >= INT_MAX) errorcall(call, "argument too large in magnitude\n"); --->> n = abs(n2 - n1) + 1 + FLT_EPSILON; if (n1 == (in1 = (int)(n1))) { ans = allocVector(INTSXP, n); if (n1 <= n2) ... ########################################################################### When the R-Prompt reappears, I get "Error: memory exhausted". I tried to replace "abs" with "dabs", but the same errors occur. Then I introduced a double variable "nd" and replaced the above line with: nd = abs(n2 - n1) + 1 + FLT_EPSILON; n = (int)nd; but nothing changed (nd gets evaluated as 1079069553). Now I changed "abs" to "fabs", ... and it works !! The dummy variable "nd" ist not needed at all.> 1:4[1] 1 2 3 4> 2:8[1] 2 3 4 5 6 7 8> seq(1,5,length=10)[1] 1.000000 1.444444 1.888889 2.333333 2.777778 3.222222 3.666667 4.111111 [9] 4.555556 5.000000 Albrecht ------------------------------------------------------------------------------ Albrecht Gebhardt email: albrecht.gebhardt at uni-klu.ac.at Institut fuer Mathematik Tel. : (++43 463) 2700/837 Universitaet Klagenfurt Fax : (++43 463) 2700/834 Villacher Str. 161 WWW : http://www-stat.uni-klu.ac.at/~agebhard A-9020 Klagenfurt, Austria ------------------------------------------------------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._