NEWS for R 1.8.0 has>> USER-VISIBLE CHANGES >> >> <......> >> >> o On Unix-like systems interrupt signals now set a flag that is >> checked periodically rather than calling longjmp from the >> signal handler. This is analogous to the behavior on Windows. >> This reduces responsiveness to interrupts but prevents bugs >> caused by interrupting computations in a way that leaves the >> system in an inconsistent state. It also reduces the number >> of system calls, which can speed up computations on some >> platforms and make R more usable with systems like Mosix.and this has already caused grief here (actually it has several days ago, when I switched our users to R-1.8.0beta __ BUT THEY DIDN'T TELL ANY R DEVELOPER __ ) for a user who does use *large* matrices. When accidentally calling print() {implicitly}, we have been used here to press CTRL+c (twice in Emacs ESS!) for stopping the output. This no longer works in R 1.8.0 at least on our unix platforms. To reproduce, type cbind(1:1e6) and try to cut it short (it only takes a minute or so, whereas our user here had a matrix that needed more than 10 minutes of screen output !)
> -----Original Message----- > From: r-devel-bounces@stat.math.ethz.ch > [mailto:r-devel-bounces@stat.math.ethz.ch] On Behalf Of > Martin Maechler > Sent: den 10 oktober 2003 12:26 > To: R-devel@stat.math.ethz.ch > Subject: [Rd] 1.8.0 on Unix: interrupting huge print()s ?? >[snip]> platforms. To reproduce, type > > cbind(1:1e6) > > and try to cut it short (it only takes a minute or so, > whereas our user here had a matrix that needed more than 10 > minutes of screen output !)Hi, just a comment that you may already know about. When I run into the same problem (in any software) it normally help to minimize the terminal window, which will then speed up the printing to standard output with several orders of magnitude. Henrik Bengtsson
I've noticed this too (on Linux) and just considered it the price of doing business. More than once I've hit Ctrl-Z and killed the process. Not exactly a solution, though :) -roger Martin Maechler wrote:>NEWS for R 1.8.0 has > > > >>> USER-VISIBLE CHANGES >>> >>> <......> >>> >>> o On Unix-like systems interrupt signals now set a flag that is >>> checked periodically rather than calling longjmp from the >>> signal handler. This is analogous to the behavior on Windows. >>> This reduces responsiveness to interrupts but prevents bugs >>> caused by interrupting computations in a way that leaves the >>> system in an inconsistent state. It also reduces the number >>> of system calls, which can speed up computations on some >>> platforms and make R more usable with systems like Mosix. >>> >>> > >and this has already caused grief here >(actually it has several days ago, when I switched our users to > R-1.8.0beta __ BUT THEY DIDN'T TELL ANY R DEVELOPER __ ) > >for a user who does use *large* matrices. > >When accidentally calling print() {implicitly}, we have been >used here to press CTRL+c (twice in Emacs ESS!) for stopping the >output. > >This no longer works in R 1.8.0 at least on our unix platforms. >To reproduce, type > > cbind(1:1e6) > >and try to cut it short (it only takes a minute or so, >whereas our user here had a matrix that needed more than 10 >minutes of screen output !) > >______________________________________________ >R-devel@stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > > >
Needs a call to R_CheckUserInterrupt at the appropriate place. The only platform that currently can interrupt a long print seems to be Rgui on Windows because of an event poll in the console output function. One possibility is to put in a check every 100 calls, say, to Rvprintf in printutils.c. I'll check that out and commit to the patches branch unless anyone sees a problem or a better place to check. luke On Fri, 10 Oct 2003, Martin Maechler wrote:> NEWS for R 1.8.0 has > > >> USER-VISIBLE CHANGES > >> > >> <......> > >> > >> o On Unix-like systems interrupt signals now set a flag that is > >> checked periodically rather than calling longjmp from the > >> signal handler. This is analogous to the behavior on Windows. > >> This reduces responsiveness to interrupts but prevents bugs > >> caused by interrupting computations in a way that leaves the > >> system in an inconsistent state. It also reduces the number > >> of system calls, which can speed up computations on some > >> platforms and make R more usable with systems like Mosix. > > and this has already caused grief here > (actually it has several days ago, when I switched our users to > R-1.8.0beta __ BUT THEY DIDN'T TELL ANY R DEVELOPER __ ) > > for a user who does use *large* matrices. > > When accidentally calling print() {implicitly}, we have been > used here to press CTRL+c (twice in Emacs ESS!) for stopping the > output. > > This no longer works in R 1.8.0 at least on our unix platforms. > To reproduce, type > > cbind(1:1e6) > > and try to cut it short (it only takes a minute or so, > whereas our user here had a matrix that needed more than 10 > minutes of screen output !) > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel >-- Luke Tierney University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke@stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
Martin Maechler <maechler@stat.math.ethz.ch> wrote:> When accidentally calling print() {implicitly}, we have been used here to > press CTRL+c (twice in Emacs ESS!) for stopping the output. > This no longer works in R 1.8.0 at least on our unix platforms.Luke Tierney <luke@stat.uiowa.edu> wrote:> Needs a call to R_CheckUserInterrupt at the appropriate place...Most unfortunate! Our system is like Martin's (Solaris 2.8, Emacs, ESS) and we also lose the use of ^C^C with R-1.8.0. It's probably enough to prevent us from upgrading. I saw no sign of Luke's proposed patch as of 10/13 (in the NEWS file); is one in the works? Thanks. -- -- David Brahm (brahm@alum.mit.edu)