Rmixmod Memory Leak

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Rmixmod Memory Leak

Dario Strbenac-2
Hello,

I would like to provide a helpful bug report to the maintainer of Rmixmod, but I'm not skilled in memory profiling.

The following example illustrates the problem :

library(Rmixmod)
genes <- matrix(rnorm(5000*50, 9, 2), nrow = 5000, ncol = 50)
selected <- sample(5000, 25)
columns <- split(1:50, rep(1:10, each = 5))
lapply(1:100, function(index) # 100 resamples with replacement
{
  lapply(1:5, function(fold) # 5-fold cross validation
  {
    apply(genes[selected, columns[[fold]]], 1, function(aGene) mixmodCluster(aGene, nbCluster = 1:3))
    return(NULL)
  })
})

Even though no data was assigned to any variables, even if I do gc() after the loop, 5 GB of RAM is used. This makes the software unusable in a loop, because the server freezes when it runs out of RAM.

May someone who is an expert help me ?

--------------------------------------
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Rmixmod Memory Leak

Jeff Newmiller
Read

?maintainer

and

the Posting Guide mentioned below.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

On July 31, 2014 6:00:21 PM PDT, Dario Strbenac <[hidden email]> wrote:

>Hello,
>
>I would like to provide a helpful bug report to the maintainer of
>Rmixmod, but I'm not skilled in memory profiling.
>
>The following example illustrates the problem :
>
>library(Rmixmod)
>genes <- matrix(rnorm(5000*50, 9, 2), nrow = 5000, ncol = 50)
>selected <- sample(5000, 25)
>columns <- split(1:50, rep(1:10, each = 5))
>lapply(1:100, function(index) # 100 resamples with replacement
>{
>  lapply(1:5, function(fold) # 5-fold cross validation
>  {
>apply(genes[selected, columns[[fold]]], 1, function(aGene)
>mixmodCluster(aGene, nbCluster = 1:3))
>    return(NULL)
>  })
>})
>
>Even though no data was assigned to any variables, even if I do gc()
>after the loop, 5 GB of RAM is used. This makes the software unusable
>in a loop, because the server freezes when it runs out of RAM.
>
>May someone who is an expert help me ?
>
>--------------------------------------
>Dario Strbenac
>PhD Student
>University of Sydney
>Camperdown NSW 2050
>Australia
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Rmixmod Memory Leak

Jim Lemon
In reply to this post by Dario Strbenac-2
Hi Dario,
The maintainer of that package is:

Benjamin Auder

and I have copied him on this message. Usually it is best to include
the maintainer in this sort of situation.

Jim

On Fri, 1 Aug 2014 01:00:21 AM Dario Strbenac wrote:
> Hello,
>
> I would like to provide a helpful bug report to the maintainer of
Rmixmod,

> but I'm not skilled in memory profiling.
>
> The following example illustrates the problem :
>
> library(Rmixmod)
> genes <- matrix(rnorm(5000*50, 9, 2), nrow = 5000, ncol = 50)
> selected <- sample(5000, 25)
> columns <- split(1:50, rep(1:10, each = 5))
> lapply(1:100, function(index) # 100 resamples with replacement
> {
>   lapply(1:5, function(fold) # 5-fold cross validation
>   {
>     apply(genes[selected, columns[[fold]]], 1, function(aGene)
> mixmodCluster(aGene, nbCluster = 1:3)) return(NULL)
>   })
> })
>
> Even though no data was assigned to any variables, even if I do gc()
after
> the loop, 5 GB of RAM is used. This makes the software unusable in
a loop,

> because the server freezes when it runs out of RAM.
>
> May someone who is an expert help me ?
>
> --------------------------------------
> Dario Strbenac
> PhD Student
> University of Sydney
> Camperdown NSW 2050
> Australia
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible
code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.