[datatable-help] Way too many alloc.col warnings?
Chris Neff
caneff at gmail.com
Tue Jan 17 16:00:56 CET 2012
Hi all,
I have the latest SVN version installed, and I am trying to run the
original crash code me and Matthew came up with, and it all looks fine
(no crashes), except I'm surprised by the number of allocwarns I get.
Every single line I get multiple warnings from alloc.col.
Should an alloc warning happen when first creating a data.table? Even
the initial creation of the code warns:
> N=100000
> dat=data.table(k1=factor(1:N), d1=rpois(N, 100), d2=rpois(N, 10),
> d3=rgamma(N,10, .001), d4=rgamma(N,1, .001), d5=rgamma(N,100,.001),
> d6=rgamma(N, 200, .001))
Warning message:
In alloc.col(value) :
growing vector of column pointers from 7 to 1000. Only a shallow
copy has been taken, see ?alloc.col. Only a potential issue if two
variables point to the same data (we can't yet detect that well) and
if not you can safely ignore this warning. To avoid this warning you
could alloc.col() first, deep copy first using copy(), wrap with
suppressWarnings() or increase the 'datatable.alloccol' option.
I have alloccol=1000 in the options now so that number makes sense,
but I thought it was supposed to start initialized to that number.
Also, every single line like:
dat[,d11:=d2/d5]
Causes two more warnings:
Warning messages:
1: In alloc.col(ans) :
growing vector of column pointers from 2 to 1000. Only a shallow
copy has been taken, see ?alloc.col. Only a potential issue if two
variables point to the same data (we can't yet detect that well) and
if not you can safely ignore this warning. To avoid this warning you
could alloc.col() first, deep copy first using copy(), wrap with
suppressWarnings() or increase the 'datatable.alloccol' option.
2: In alloc.col(ans) :
growing vector of column pointers from 12 to 1000. Only a shallow
copy has been taken, see ?alloc.col. Only a potential issue if two
variables point to the same data (we can't yet detect that well) and
if not you can safely ignore this warning. To avoid this warning you
could alloc.col() first, deep copy first using copy(), wrap with
suppressWarnings() or increase the 'datatable.alloccol' option.
It seems to me either the warning is borked or the alloccol isn't
doing what it should? The options I have set are:
options(datatable.alloccol=1000)
options(datatable.allocwarn=TRUE)
options(datatable.verbose=TRUE)
More information about the datatable-help
mailing list