tidyverse / multidplyr

A dplyr backend that partitions a data frame over multiple processes
https://multidplyr.tidyverse.org
Other
641 stars 75 forks source link

Clusters created does not automatically clean up #31

Closed KangChungYang closed 8 years ago

KangChungYang commented 8 years ago

Here is my code:

cl <- create_cluster(8)
set_default_cluster(cl)
data_par <- data %>% partition(IID, cluster=cl)
cluster_assign_value(cluster=cl, "myfun", myfun)
out <- data_par %>% do(res=myfun(.)) %>% collect()

After that, sometimes the clusters created does not automatically clean up Is there any function can close those clusters?

Ax3man commented 8 years ago

data_par is still partitioned, so the cluster should not be cleaned up, I think. You can use parallel::stopCluster(cl) to close it anyway.

hadley commented 8 years ago

You need to delete data_par and then the gc will eventually clean up the cluster.