我在ec2上使用RStudio时遇到崩溃,同时使用doSNOW包对当前32个内核进行集群。问题不断发生,RStudio和awslog中的日志显示以下问题:
The previous R session was abnormally terminated due to an unexpected crash. You may have lost workspace data as a result of this crash
我尝试了在RStudio社区页面上找到的一种解决方法,如下所示:
rm -rf ~/.rstudio
我重启了它,终止了RStudio很多次,但都没有用。我更改为一个更大的实例: r4.8xlarge,但也无法进行计算。
Apr 30 14:14:23 ip-172-31-46-102 rsession-rstudio[12984]: ERROR session hadabend; LOGGED FROM: rstudio::core::Error {anonymous}::rInit(const rstudio::r::session::RInitInfo&) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:563
这是RStudio崩溃时的以下代码:
# Clustering using gower distance and hclust()
d <- sapply(1:nrow(data), function(i) gower_dist(data[i,], data))
d <- as.dist(d)
h <- hclust(d) # this causes error
发布于 2019-05-02 18:13:23
问题解决了- hclust并不真正适合大数据。将其替换为flashClust不会再导致RStudio崩溃,并且计算成功。
https://stackoverflow.com/questions/55949451
复制相似问题