[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:
library(tcltk)
library(multicore)
example(mclapply)
> sessionInfo()
R version 2.9.1 (2009-06-26)
x86_64-pc-linux-gnu
locale:
LC_CTYPE=da_DK.UTF-8;LC_NUMERIC=C;LC_TIME=da_DK.UTF-8;LC_COLLATE=da_DK.UTF-8;LC_MONETARY=C;LC_MESSAGES=da_DK.UTF-8;LC_PAPER=da_DK.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=da_DK.UTF-8;LC_IDENTIFICATION=C
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