[Bioc-devel] request: timings

2013-03-16 Thread Kasper Daniel Hansen
Is it possible to get _R_CHECK_TIMINGS_=0 set in the build system when
R CMD check is being run?  Not super important, but convenient and it
should be easy to add.

Kasper

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] vignettes using foreach on Windows

2013-03-16 Thread Dan Tenenbaum
On Sat, Mar 16, 2013 at 6:11 PM, Kasper Daniel Hansen
 wrote:
> Posted here in case other people could benefit.
>

This is great. Various permutations of this issue have bitten us from
time to time.


> This is solving an issue with writing a vignette using the doParallel
> backend on Windows.
>
> If you're using foreach on Windows with the doParallel backend, the
> default is to make a socket cluster (since windows don't have fork).
> If you do it on a vignette, the socket cluster will open a number of
> connections (default 3) which will prevent the vignette from being
> build with something that looks like a latex error
>
> Warning: running command
> '"C:\PROGRA˜2\MIKTEX˜1.9\miktex\bin\texi2dvi.exe" --quiet --pdf
> "bumphunter.tex"  -I
> "E:/biocbld/bbs-2.12-bioc/R/share/texmf/tex/latex" -I
> "E:/biocbld/bbs-2.12-bioc/R/share/texmf/bibtex/bst"' had status 1
> Error in find_vignette_product(name, by = "texi2pdf", engine = engine) :
>   Failed to locate the 'texi2pdf' output file (by engine
> 'utils::Sweave') for vignette with name 'bumphunter'. The following
> files exists in directory '.': 'bumphunter-clusterplot.pdf',
> 'bumphunter-plotSegments.pdf', 'bumphunter.Rnw', 'bumphunter.bib',
> 'bumphunter.tex'
> Calls:  -> find_vignette_product
>
> At first, it seems like this is solvable by just running
> closeAllConnections() [ Thanks to Henrik Bengstsson ].  Unfortunately,
> when the vignette is being Sweave'd, there is a sink() connection
> open; closing this connection will make R CMD build exit.  The
> solution is to close all socket connects, which you can do with this
> Sweave chunk:
>
>
> \section*{Cleanup}
>
> This is a cleanup step for the vignette on Windows; typically not
> needed for users.
>
> <>=

I suppose this could be marked echo=FALSE since the reader of the
vignette doesn't
really need to know that it's happening, but that's a matter of taste,
I suppose.

Thanks for posting this!
Dan


> allCon <- showConnections()
> socketCon <- as.integer(rownames(allCon)[allCon[, "class"] == "sockconn"])
> sapply(socketCon, function(ii) close.connection(getConnection(ii)) )
> @
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] vignettes using foreach on Windows

2013-03-16 Thread Kasper Daniel Hansen
Posted here in case other people could benefit.

This is solving an issue with writing a vignette using the doParallel
backend on Windows.

If you're using foreach on Windows with the doParallel backend, the
default is to make a socket cluster (since windows don't have fork).
If you do it on a vignette, the socket cluster will open a number of
connections (default 3) which will prevent the vignette from being
build with something that looks like a latex error

Warning: running command
'"C:\PROGRA˜2\MIKTEX˜1.9\miktex\bin\texi2dvi.exe" --quiet --pdf
"bumphunter.tex"  -I
"E:/biocbld/bbs-2.12-bioc/R/share/texmf/tex/latex" -I
"E:/biocbld/bbs-2.12-bioc/R/share/texmf/bibtex/bst"' had status 1
Error in find_vignette_product(name, by = "texi2pdf", engine = engine) :
  Failed to locate the 'texi2pdf' output file (by engine
'utils::Sweave') for vignette with name 'bumphunter'. The following
files exists in directory '.': 'bumphunter-clusterplot.pdf',
'bumphunter-plotSegments.pdf', 'bumphunter.Rnw', 'bumphunter.bib',
'bumphunter.tex'
Calls:  -> find_vignette_product

At first, it seems like this is solvable by just running
closeAllConnections() [ Thanks to Henrik Bengstsson ].  Unfortunately,
when the vignette is being Sweave'd, there is a sink() connection
open; closing this connection will make R CMD build exit.  The
solution is to close all socket connects, which you can do with this
Sweave chunk:


\section*{Cleanup}

This is a cleanup step for the vignette on Windows; typically not
needed for users.

<>=
allCon <- showConnections()
socketCon <- as.integer(rownames(allCon)[allCon[, "class"] == "sockconn"])
sapply(socketCon, function(ii) close.connection(getConnection(ii)) )
@

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel