[R-sig-hpc] multicore mclapply hangs when 'debug' loaded

Rune Schjellerup Philosof rphilosof at health.sdu.dk
Tue Aug 11 09:04:17 CEST 2009

Dirk Eddelbuettel skrev:
> On 11 August 2009 at 09:07, Mark.Bravington at csiro.au wrote:
> | As the author of the 'debug' package, but knowing nothing about multicore
> | (I'm a Windows user)-- 

The newest version of multicore 0.1-4 has experimental support for Windows.

> I will just point out that 'debug' uses 'tcltk', and I
> | wonder whether 'tcltk' is interfering with things-- my impression is that
> | 'tcltk' has a rather murky approach to "event loop handling". Otherwise it's
> Good point!
> | 
> | So it might be interesting to just do library( tcltk) without library(
> | debug) and see if you can still trigger the problems. 

Excellent suggestion, it was the tcltk package that triggered it, not
the debug package.

> That may well be it. The multicore docs even say 
>    However, the copy shares everything including any user interface
>    elements. This can cause havoc since let's say one window now suddenly
>    belongs to two processes. Therefore \emph{multicomp} should be
>    preferrably used in console R and code executed in parallel may
>    never use GUIs or on-screen devices.
> which would put us back into 'documented behaviour'. The error would then be
> on Rune's part for mixing GUIs and multicore.

I wouldn't call it documented behavior that the tcltk package should not
be loaded.
The intuitive rule is that you should not use any GUI calls in the code
executed in the created child processes.

This simple R --vanilla session hangs:

> sessionInfo()
R version 2.9.1 (2009-06-26)


attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods 
[8] base    

other attached packages:
[1] multicore_0.1-3

On Ubuntu 8.10.

Med venlig hilsen
Rune Schjellerup Philosof
Ph.d.-studerende, Statistik, IST, SDU

Telefon:  6550 3607
E-mail:   rphilosof at health.sdu.dk
Adresse:  J.B. Winsløwsvej 9, 5000 Odense C

More information about the R-sig-hpc mailing list