[R-br] Alocação de memória

Vinicius Brito Rocha viniciusbritor em gmail.com
Terça Setembro 23 22:29:29 BRT 2014


 Ari,
1 - Seu sistema Operacional é 32 bits. Mude para um de 64 .
2 - Então compre mais memora RAM
3 - Caso não funcione precisará aprender a fazer as coisas em paralelo.

Abs e Boa sorte

Em 23 de setembro de 2014 22:06, Ari Clecius <ari072000 em yahoo.com.br>
escreveu:

> Prezados colegas da lista, estava tentando rodar este exemplo quando tive
> problema de alocação de memória, alguém poderia me ajudar a resolver?
>
> Att,
>
> Ari Clecius Alves de Lima
> Engenheiro Químico
> Me. Engenharia Civil
> (085)88412345
> (085)33669042
>
> #CMR
>
> *processador: Intel(R) Core(TM) i3 CPU M380 @2.53GHz*
> *Memória instalada(RAM): 4,00 GB (utilizável:2,93)*
> *Sistema oeracional de 32 Bits*
>
> *R version 3.1.1 (2014-07-10) -- "Sock it to Me"*
> *Copyright (C) 2014 The R Foundation for Statistical Computing*
> *Platform: i386-w64-mingw32/i386 (32-bit)*
>
> *N <- 100000000*
> *x <- runif(N)*
> *y <- runif(N)*
> *ok <- sum(x^2 + y^2 < 1)*
> *mc.pi <- 4 * ok / N*
> *sprintf("pi = %.6lf\n", mc.pi)*
>
> *#1ª tentativa*
>
> *>N <- 100000000*
> *>x <- runif(N)*
> *> y <- runif(N)*
> *Error: cannot allocate vector of size 762.9 Mb*
> *In addition: Warning messages:*
> *1: In runif(N) : Reached total allocation of 1535Mb: see
> help(memory.size)*
> *2: In runif(N) : Reached total allocation of 1535Mb: see
> help(memory.size)*
> *3: In runif(N) : Reached total allocation of 1535Mb: see
> help(memory.size)*
> *4: In runif(N) : Reached total allocation of 1535Mb: see
> help(memory.size)*
> *> ok <- sum(x^2 + y^2 < 1)*
> *Error: cannot allocate vector of size 762.9 Mb*
> *In addition: Warning messages:*
> *1: Reached total allocation of 1535Mb: see help(memory.size) *
> *2: Reached total allocation of 1535Mb: see help(memory.size) *
> *3: Reached total allocation of 1535Mb: see help(memory.size) *
> *4: Reached total allocation of 1535Mb: see help(memory.size) *
> *> mc.pi <- 4 * ok / N*
> *Error: object 'ok' not found*
> *> sprintf("pi = %.6lf\n", mc.pi)*
> *Error in sprintf("pi = %.6lf\n", mc.pi) : object 'mc.pi' not found*
>
> *memory.size(2900)*
>
> *2ª tentativa*
> *> N <- 100000000*
> *> x <- runif(N)*
> *Error: cannot allocate vector of size 762.9 Mb*
> *> y <- runif(N)*
> *Error: cannot allocate vector of size 762.9 Mb*
> *> ok <- sum(x^2 + y^2 < 1)*
> *Error: cannot allocate vector of size 762.9 Mb*
> *> mc.pi <- 4 * ok / N*
> *Error: object 'ok' not found*
> *> sprintf("pi = %.6lf\n", mc.pi)*
> *Error in sprintf("pi = %.6lf\n", mc.pi) : object 'mc.pi' not found*
>
> _______________________________________________
> R-br mailing list
> R-br em listas.c3sl.ufpr.br
> https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
> Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça
> código mínimo reproduzível.
>



-- 
*Vinicius Brito Rocha.*
*Estatístico e Atuário *
*M.Sc. Engenharia de Produção/PO*
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20140923/f5f5b637/attachment.html>


Mais detalhes sobre a lista de discussão R-br