[R] segfault 'memory not mapped', dual core problem?

Benilton Carvalho bcarvalh at jhsph.edu
Sun Nov 12 21:55:01 CET 2006


On Nov 12, 2006, at 3:35 PM, Peter Dalgaard wrote:

>> My fix was to remap my group variable so that it would always start
>> from 1.
>
> Ugh!
>
> You shouldn't "fix" something like that, instead try your very best to
> find circumstances where you reproduce the crash as quickly as
> possible, prefering using a minimal setup without external data, and
> report it (or try debugging it yourself).

I reported on Sep 7th (the maintainer directly). But I haven't heard  
back, nor the solution implemented yet. Probably a matter of time?

Anyways, all one need to do is:

#####

require(cluster)
set.seed(1)
x=rnorm(100)
g=sample(2:4, 100, replace=T)

for (i in 1:10){
  print(i)
  tmp1=silhouette(g, dist(x))
}

######

the above fails on the 2nd step, ie, i==2.

But using the code below, it works as expected.

#####

require(cluster)
set.seed(1)
x=rnorm(100)
g=sample(2:4, 100, replace=T)

for (i in 1:1000){
  print(i)
  tmp2=silhouette(as.numeric(as.factor(g)), dist(x))
}

######

Btw, tmp1 and tmp2 are two different results...

Cheers,
Benilton



More information about the R-help mailing list