[R] rpart on Alpha under OSF

Albrecht Gebhardt albrecht.gebhardt at uni-klu.ac.at
Thu Dec 23 19:35:54 CET 1999


On Thu, 23 Dec 1999, F.Tusell wrote:

> Running on an Alpha machine which reports (uname -a)
> 
>        OSF1 bsdx01.bs.ehu.es V4.0 878 alpha
> 
> and using  the binary distribution  put together by  Albrecht Gebhardt
> (in    http://cran.at.r-project.org/bin/osf/osf4.0/tar/alpha_ev5/)   
this is a little bit outdated (0.65.0), I should make a new tar snapshot
of 0.90.1, but I guess it wouldn't solve your segfault problem.

Sorry but I have no time to test all parts of this binary package, I guess
there is more then this one alpha specific bug hidden somewhere. 

Anyway you could try to use gdb to locate the error.

First get the R sources + rpart sources somewhere in your homedir.
Start R (could even be in (X)emacs with ESS), type "library(rpart)", 
get its process id (ps axuw| grep R.X11),
start "gdb path_to_/R.X11" (preferably in emacs or Xemacs via alt-x gdb),
type the gdb commands

  cd somewhere_in_your_home_dir 
  dir path_to_Rsrc/src/library/rpart/src 
  dir path_to_Rsrc/src/main
  dir path_to_Rsrc/src/unix
  dir path_to_Rsrc/src/appl
  dir path_to_Rsrc/src/nmath
  sharedlib path_to_R/library/rpart/libs/rpart.so
  attach process_id_of_R.X11

eventually set breakpoints with "break subroutinename" and then 

  continue

Now type your R commands and watch gdb where you are when the crash
occurs. (e.g. with "backtrace", or "list")

When finished: 
  detach

> obtain  core dumps  whenever I  try  to use  package rpart.  I have  R
> REMOVE'd the rpart package, downloaded the source rpart_1.0-7.tar from
> CRAN  and attempted  a compilation.  Everything works  fine  until the
> linking step, when I get:
> 
> f77 -shared  -o /users/etptupaf/R/library/rpart/libs/rpart.so anova.o anovapred.o branch.o bsplit.o choose_surg.o fix_cp.o free_tree.o gini.o graycode.o insert_split.o make_cp_list.o make_cp_table.o mysort.o nodesplit.o partition.o poisson.o poissonpred.o pred_rpart.o rpart.o rpcountup.o rplabel.o rpmatrix.o rundown.o rundown2.o s_to_rp.o s_xpred.o surrogate.o xval.o -lUfor -lfor -lFutil -lm -lots -lm
> ld:
> Warning: Unresolved:
> S_alloc
> 
> What is S_alloc? Do  I have to install the full source  for R in order
> to compile a package? I do not have root rights on this machine, which

This is only a warning, it could be supressed with the linker option
"-expect_unresolved *", but it makes no difference for the result.
It simply indicates that S_alloc (subroutine in R.X11) gets called from
within rpart.so.

You don't need the complete R sources, even for the gdb experiment above.
But may it is better to have them, to be able to "step" through the
complete code within gdb.

A new alpha binary tar file (0.90.1) should appear soon on CRAN.


Albrecht
......................................................................
| Albrecht Gebhardt          Tel.: (++43 463) 2700/832               |
| Institut fuer Mathematik   Fax : (++43 463) 2700/834               |
| Universitaet Klagenfurt    mailto:albrecht.gebhardt at uni-klu.ac.at  |
| Villacher Str. 161         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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list