To avoid the warnings from gc(), call parallel::stopCluster(cl) before
removing or overwriting cl.

-Bill

On Thu, Mar 4, 2021 at 1:52 AM Shah Alam <dr.alamsola...@gmail.com> wrote:
>
> Hello everyone,
>
> I am using the "parallel" R package for parallel computation.
>
> Code:
>
>    # set number of cores
>     cl <- makeCluster(8, type = "PSOCK")  # Mac/Linux need to set as "FORK"
>
>       # pass functions and objects to the cluster environment and set seed
>       # all the items exported need to stay in the global environment!!
>       clusterCall(cl, function() { source("xx.R" )})
>       clusterExport(cl, list("a", "b", "c", "d",
>                              "5"))
>       clusterSetRNGStream(cl, 1)
>
> While parallel processing, I receive the following warning signs.  Do I
> need to ignore these signs or do they potentially slow the whole process?
>
>  *  Warning signs:*
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 19
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 18
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 17
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 16
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 15
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 14
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 13
> Warning in for (i in seq_len(Ne + echo)) { :
>   closing unused connection 12
>
> Best regards,
> Shah Alam
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to