[R] Rgui: workaround for hang from tseries and other packages using Fortran I/O

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 12 Dec 2007 19:29:42 +0000 (GMT)


Several people have reported hanging when using garch() from tseries under Rgui (Windows), as well as from other packages using Fortran I/O.

We will have a revised tseries that does not suffer from the problem shortly, but here is a generic workaround: set the environment variable GFORTRAN_STDOUT_UNIT to -1 before running R (critically before using any package or module such as Lapack, BLAS ... that uses Fortran) One simple way to do this is to have

if(.Platform$GUI == "Rgui") {

     Sys.setenv(GFORTRAN_STDOUT_UNIT = "-1")
     Sys.setenv(GFORTRAN_STDERR_UNIT = "-1")
}

in your ~/.Rprofile file. The second line is not needed for tseries but could be needed for other programs. This will be in R-devel and R-patched shortly.

Note that Fortran output is still lost: this is just a palliative measure and the real fix for tseries generates the desired output.

(I had to read through the libgfortran to find this: it is confusing that Windows I/O is done by a file named unix.c!)

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Wed 12 Dec 2007 - 19:33:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 12 Dec 2007 - 20:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.