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

Dirk Eddelbuettel edd at debian.org
Tue Aug 11 02:01:18 CEST 2009


Hi Mark,

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)-- 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!

| hard to see what 'debug' might be doing. Although 'debug' does use some
| tricky (but perfectly legal!) R stuff with binding- and environment-locking
| in its '.onLoad', there's much less than 'mvbutils' does, and Rune has not
| reported any problems with mvbutils alone.  
| 
| So it might be interesting to just do library( tcltk) without library(
| debug) and see if you can still trigger the problems. 

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.

Dirk

| -- 
| Mark Bravington
| CSIRO Mathematical & Information Sciences
| Marine Laboratory
| Castray Esplanade
| Hobart 7001
| TAS
| 
| ph (+61) 3 6232 5118
| fax (+61) 3 6232 5012
| mob (+61) 438 315 623
| 
| Rune Schjellerup Philosof wrote:
| > Dirk Eddelbuettel skrev:
| >> On 10 August 2009 at 13:55, Rune Schjellerup Philosof wrote:
| >>> When I execute mclapply it creates the needed processes, but these
| >>> processes never begin computing anything, they just wait
| >>> indefinitely. 
| >> 
| > 
| > I discovered that it occurs when I have loaded the 'debug' package at
| > the same time as the 'multicore' package.
| > However, I use a version of the 'debug' package that hasn't been
| > released yet.
| > Still though, it also some times happen when I don't have 'debug'
| > loaded (I just realized because of the sessionInfo included below).
| > But at the moment I have to load the 'debug' package to make the bug
| > appear (just loading mvbutils does not cause the effect).
| > 
| >> Would you have a reproducible example?
| >> 
| > Start R --vanilla:
| > library(debug)
| > library(multicore)
| > example(mclapply)
| > 
| >>> I recently upgraded to version 2.9.1, which might have caused the
| >>> problem. 
| >> 
| >> That would surprise me but one never knows.
| >> 
| > 
| > I mention it because the debug package stopped working because of
| > non-backwards-compatible changes.
| > 
| >>> I use Ubuntu 8.10.
| >>> 
| >>>> 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] stats     graphics  grDevices utils     datasets  methods   base
| >>> 
| >>> other attached packages:
| >>> [1] multicore_0.1-3
| >>> 
| >>> loaded via a namespace (and not attached):
| >>> [1] tcltk_2.9.1 tools_2.9.1
| >>> 
| >>> 
| >>> 
| >>> 
| >>> --
| >>> 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
| >>> 
| >>> _______________________________________________
| >>> R-sig-hpc mailing list
| >>> R-sig-hpc at r-project.org
| >>> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
-- 
Three out of two people have difficulties with fractions.



More information about the R-sig-hpc mailing list