Perhaps just try
source("xx.R")
invisible(gc()) # do warnings appear after this?
It does seem likely that the sourced file causes the problem, since
parallel::createCluster labels the connections ":" and that label would show up in the warning.
On Thu, Mar 4, 2021 at 11:28 AM Henrik Bengts
Test with:
clusterCall(cl, function() { suppressWarnings(source("xx.R")) })
If the warnings disappear, then the warnings are produced on the
workers from source():ing the file.
/Henrik
On Thu, Mar 4, 2021 at 10:20 AM Bill Dunlap wrote:
>
> The warnings come from the garbage collector, which ma
The warnings come from the garbage collector, which may be called from
almost anywhere. It is possible that the file that is sourced causes
the problem, but if you don't call parallel::stopCluster before
removing the cluster object you will get those warnings.
> cl <- parallel::makeCluster(3, typ
I don't think 'parallel' is to blame in this case. Those warnings:
Warning in for (i in seq_len(Ne + echo)) { :
closing unused connection 19
come from base::source()
[https://github.com/wch/r-source/blob/9caddc1eaad1f480283f1e98af34a328699d1869/src/library/base/R/source.R#L166-L244].
Unless th
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 wrote:
>
> Hello everyone,
>
> I am using the "parallel" R package for parallel computation.
>
> Code:
>
># set number of cores
> cl <- makeCl
Hi Shah,
The error usually means you started a cluster and forgot to close it. From
the code you post, I cannot see any problem. Maybe you run `makeCluster`
twice by accident?
Best,
Jiefei
On Thu, Mar 4, 2021 at 5:53 PM Shah Alam wrote:
> Hello everyone,
>
> I am using the "parallel" R package
6 matches
Mail list logo