R-beta: Segmentation fault

Jarle Tufto jarlet at math.ntnu.no
Mon Aug 24 15:52:57 CEST 1998

Dear everyone,

I'm doing some simulations which involves bootstrapping
(using functions written in c loaded with R's dyn.load()
function) and maximising the likelihood function with R's
nlm() function. I used to run my code in S-plus but because
I frequently ran out of memory (because of S-plus' silly
memory management), I decided to try porting my code to R. 
In R (on a linux platform), everything seems to work
smoothly (no memory buildup according to gc() ), except that
I, every now and then, get the error message "Segmentation
fault - core dumped".  I haven't quite figured out which
part of my code is generating the problem; the error
actually seems to pop up at different places in my code
depending on the exact history of the R-session - which I
find very strange.  Also, if run exactly the same sequence
of commands in two separate R-sessions, R terminates at
exactly the same point.  This led me to believe that my
code somehow generates an illegal data set just before the
error occurs.  However, if I write each bootstrap replicate
to a file and, and then reload the data in a new R-session
and refit the model, no error shows up.

Could it possibly it is something going on inside R which is
causing the problem?  Or that I have a hardware problem??

Jarle Tufto                         Email: jarlet at math.ntnu.no
Dept. of Math. Sci.,Lade            http://www.math.ntnu.no/~jarlet
Norwegian Univ. of Sci. and Techn.  Phone:+47 735 91498
7034 Trondheim, Norway              Fax:+47 735 91038
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