[NMF-user] error running NMF_0.16.2 in R 3.0.0 on OS X 10.7.5

Gordon Robertson grobertson at bcgsc.ca
Sun Apr 7 19:12:20 CEST 2013


Thanks Renaud,

Turning shared memory off seems to work. The following was run in the Mac terminal. The run with the error was copied from yesterday's screen output. The run that follows is from today.  I'm happy to work with you offline (or on line) to clarify what's happening on OS X, or to make a binary Mac package. Just let me know what I can do.

> res <- nmf(esGolub,3,seed=123456,nrun=5,.options='v')
NMF algorithm: 'brunet'
Multiple runs: 5
Mode: parallel (7/8 core(s))
Runs: |==================================================| 100%
Error: NMF::nmf - 5/5 fit(s) threw an error.
# Error(s) thrown:
  - run #1: Fatal error in attach: big.matrix could not be attached.
Timing stopped at: 13.673 0.579 4.927

> nmf.options(shared.memory=FALSE)
> res <- nmf(esGolub,3,seed=123456,nrun=5,.options='v')
NMF algorithm: 'brunet'
Multiple runs: 5
Mode: parallel (7/8 core(s))
Runs: |==================================================| 100%
System time:
   user  system elapsed
 12.603   0.576   4.540

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
 [1] doParallel_1.0.1    iterators_1.0.6     foreach_1.4.0
 [4] RColorBrewer_1.0-5  NMF_0.16.2          synchronicity_1.1.0
 [7] bigmemory_4.4.3     BH_1.51.0-0         bigmemory.sri_0.1.2
[10] Biobase_2.20.0      BiocGenerics_0.6.0  digest_0.6.3
[13] rngtools_1.2        pkgmaker_0.15.2     registry_0.2

loaded via a namespace (and not attached):
[1] codetools_0.2-8  colorspace_1.2-1 compiler_3.0.0   gridBase_0.4-6
[5] stringr_0.6.2    tools_3.0.0      xtable_1.7-1

G
--
Gordon Robertson
Michael Smith Genome Sciences Centre
BC Cancer Agency
Vancouver BC Canada
www.bcgsc.ca<http://www.bcgsc.ca>


On 2013-04-07, at 12:58 AM, Renaud Gaujoux wrote:

Hi,

I saw this error on CRAN's Mac check logs as well. This seems to be linked with the shared.memory feature when running parallel computations, on Mac only.
I have no Mac to thoroughly check and asked the author of bigmemory to see if he could reproduce the error: he could not when running the example in an R console, but got an error when running the checks.
So this will need further investigations.

Did you reinstall all packages, specially bigmemory, after upgrading to R-3.0.0?

You should still be able to run parallel computations but disabling shared.memory by:

nmf.options(shared.memory=FALSE)

If you do not want to remember/type this every time you load NMF, you could simply uninstall the synchronicity package, which you probably do not need otherwise. The shared memory feature will then be disabled for good.

Bests,
Renaud




2013/4/7 Gordon Robertson <grobertson at bcgsc.ca<mailto:grobertson at bcgsc.ca>>
Renaud,

With R 3.0.0, I get an error when I try to run a test. I'm likely missing something simple. Could you help me resolve this?

> library(NMF)
Loading required package: pkgmaker
Loading required package: registry

Attaching package: ‘pkgmaker’

The following object is masked from ‘package:utils’:

    packageName

Loading required package: rngtools
Loading required package: digest
Loading required package: grid
NMF - BioConductor layer [OK] | Shared memory capabilities [OK] | Cores 7/8
> library(RColorBrewer)
> n <- 100; counts <- c(10, 5, 8); p <- sum(counts)
> V <- syntheticNMF(n, counts, noise=TRUE)
> groups <- as.factor(do.call('c', lapply(seq(3), function(x) rep(x, counts[x]))))
> res <- nmf(V, 3, nrun=100)
Error: NMF::nmf - 100/100 fit(s) threw an error.
# Error(s) thrown:
  - run #1: Fatal error in attach: big.matrix could not be attached.
Timing stopped at: 31.804 1.025 5.987

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
 [1] doParallel_1.0.1    iterators_1.0.6     foreach_1.4.0
 [4] RColorBrewer_1.0-5  NMF_0.16.2          synchronicity_1.1.0
 [7] bigmemory_4.4.3     BH_1.51.0-0         bigmemory.sri_0.1.2
[10] Biobase_2.20.0      BiocGenerics_0.6.0  digest_0.6.3
[13] rngtools_1.2        pkgmaker_0.15.2     registry_0.2

loaded via a namespace (and not attached):
[1] codetools_0.2-8  colorspace_1.2-1 compiler_3.0.0   gridBase_0.4-6
[5] stringr_0.6.2    xtable_1.7-1

--
I'm able to run simple jobs.
> x <- rmatrix(20,10)
> res <- nmf(x, 2)
> res <- nmf(x, 2, 'lee')

--
But possibly larger jobs hit the error?
> data(esGolub)
> res <- nmf(esGolub,3,seed=123456)
> res <- nmf(esGolub,3,seed=123456,nrun=20)
Error: NMF::nmf - 20/20 fit(s) threw an error.
# Error(s) thrown:
  - run #1: Fatal error in attach: big.matrix could not be attached.
Timing stopped at: 71.596 1.011 14.788

> res <- nmf(esGolub,3,seed=123456,nrun=5,.options='v')
NMF algorithm: 'brunet'
Multiple runs: 5
Mode: parallel (7/8 core(s))
Runs: |==================================================| 100%
Error: NMF::nmf - 5/5 fit(s) threw an error.
# Error(s) thrown:
  - run #1: Fatal error in attach: big.matrix could not be attached.
Timing stopped at: 13.673 0.579 4.927


Thank you,

G
--
Gordon Robertson
Michael Smith Genome Sciences Centre
BC Cancer Agency
Vancouver BC Canada
www.bcgsc.ca<http://www.bcgsc.ca/>


On 2013-04-06, at 12:47 PM, Gordon Robertson wrote:

Hi Renaud,

I thought I'd send these notes on the chance that they'd be helpful to others. I installed NMF, but have not yet run it. The one thing that was a bit odd is the warning (...is not available (for R version 3.0.0)).

I've been using v0.9 for some time on R v2.15.x, on OS X 10.7.5. Today I updated R to v3.0.0, and got an error message when installing from the v0.9 .tgz from the latest RStudio (which is how I'd installed NMF on v2.15.x).

RStudio did not recognize that v0.16.2 was available at CRAN (seeing only NMFN available, but not NMF), and after trying to install a few .tar.gz versions from your CRAN-like web page (but failing to achieve a loadable library), a Google search suggested I look at CRAN. From there I downloaded v0.16.2's tar.gz, and installed it from RStudio's GUI installer.  All seemed OK.

> install.packages("~/software/clustering/NMF/R/NMF/v0.16.2/NMF_0.16.2.tar.gz", repos = NULL, type = "source")
Warning in install.packages :
  package ‘~/software/clustering/NMF/R/NMF/v0.16.2/NMF_0.16.2.tar.gz’ is not available (for R version 3.0.0)
...
> library(NMF)
Loading required package: pkgmaker
Loading required package: registry

Attaching package: ‘pkgmaker’

The following object is masked from ‘package:utils’:

    packageName

Loading required package: rngtools
Loading required package: digest
Loading required package: grid
NMF - BioConductor layer [OK] | Shared memory capabilities [NO: synchronicity] | Cores 7/8
  To enable shared memory capabilities, try: install.extras('NMF')

> install.extras('NMF')
Loaded extra package: bigmemory
trying URL 'http://cran.stat.sfu.ca/bin/macosx/contrib/3.0/synchronicity_1.1.0.tgz'
Content type 'application/x-gzip' length 206844 bytes (201 Kb)
opened URL
==================================================
downloaded 201 Kb


The downloaded binary packages are in
/var/folders/x5/l6f5m2j91vdd99wy2gchtld40000gn/T//RtmpLXt3yC/downloaded_packages
Loading required package: synchronicity
Loaded extra package: Biobase

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] parallel  grid      stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] synchronicity_1.1.0  NMF_0.16.2           bigmemory_4.4.3      BH_1.51.0-0          bigmemory.sri_0.1.2
 [6] Biobase_2.20.0       BiocGenerics_0.6.0   digest_0.6.3         rngtools_1.2         pkgmaker_0.15.2
[11] registry_0.2         BiocInstaller_1.10.0

loaded via a namespace (and not attached):
 [1] codetools_0.2-8    colorspace_1.2-1   doParallel_1.0.1   foreach_1.4.0      gridBase_0.4-6
 [6] iterators_1.0.6    RColorBrewer_1.0-5 stringr_0.6.2      tools_3.0.0        xtable_1.7-1


Gordon
--
Gordon Robertson
Michael Smith Genome Sciences Centre
BC Cancer Agency
Vancouver BC Canada
www.bcgsc.ca<http://www.bcgsc.ca/>




_______________________________________________
nmf-user mailing list
nmf-user at lists.r-forge.r-project.org<mailto:nmf-user at lists.r-forge.r-project.org>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/nmf-user



--

Renaud Gaujoux
Computational Biology - University of Cape Town
South Africa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/nmf-user/attachments/20130407/f4853e8d/attachment.html>


More information about the nmf-user mailing list