Re: [R-pkg-devel] "Connections left open" Error

2021-08-27 Thread Avraham Adler
On Fri, Aug 27, 2021 at 10:25 AM Uwe Ligges 
wrote:

>
>
> On 23.08.2021 18:07, Alan Aw wrote:
> > Hi,
> >
> > I submitted a package to CRAN, but it keeps failing a particular check
> for
> > Windows. This error shows up when I check my code examples.
> >
> > Error: connections left open:
> >>  <-CRANwin.fb05.statistik.uni-dortmund.de:11602
> >>  (sockconn)
> >>  <-CRANwin.fb05.statistik.uni-dortmund.de:11602
> >>  (sockconn)
> >> Execution halted
> >
> >
> > For context, my code example does the following.
> >
> > suppressWarnings(require(doParallel))
> >> registerDoParallel(cores = 2)
> >>
> >
> >
> > # Some code examples that use foreach and %dopar%
> >
> >
> >
> > stopImplicitCluster()
> >
> >
> > Other contextual information:
> >
> > - I already import doParallel in the DESCRIPTION file.
> > - My package passes all checks on the Linux machine.
> >
> > I have read elsewhere (e.g., this thread
> > ) that examples
> with
> > parallelization lead to this error. However stopImplicitCluster() does
> not
> > seem to fix it.
> >
> > Could someone familiar with this please troubleshoot? Thank you.
>
> No idea about the doParallel package, but perhaps it helps to open a
> cluster explicitly and in the end stop exactly that cluster?
>
> Best,
> Uwe Ligges
> >
> > Alan


As per Dr. Ligges, I’ve had more success closing the named cluster than
using stopImplicit.

Avi

>
> --
Sent from Gmail Mobile

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] "Connections left open" Error

2021-08-27 Thread Uwe Ligges




On 23.08.2021 18:07, Alan Aw wrote:

Hi,

I submitted a package to CRAN, but it keeps failing a particular check for
Windows. This error shows up when I check my code examples.

Error: connections left open:

 <-CRANwin.fb05.statistik.uni-dortmund.de:11602
 (sockconn)
 <-CRANwin.fb05.statistik.uni-dortmund.de:11602
 (sockconn)
Execution halted



For context, my code example does the following.

suppressWarnings(require(doParallel))

registerDoParallel(cores = 2)




# Some code examples that use foreach and %dopar%



stopImplicitCluster()


Other contextual information:

- I already import doParallel in the DESCRIPTION file.
- My package passes all checks on the Linux machine.

I have read elsewhere (e.g., this thread
) that examples with
parallelization lead to this error. However stopImplicitCluster() does not
seem to fix it.

Could someone familiar with this please troubleshoot? Thank you.


No idea about the doParallel package, but perhaps it helps to open a 
cluster explicitly and in the end stop exactly that cluster?


Best,
Uwe Ligges


Alan

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel