Wiener, Matthew
2001-Nov-29 20:20 UTC
[R] memory: as.single in .Fortran creates another double
Hi, everyone. As mentioned in my message of earlier today, I'm trying to do hierarchical clustering on a data set that's probably too big. I may have to take a subset eventually, but I'm spending a little time trying to try to reduce memory use in the hope that I'll manage to do the full set. One thing that occurred to me was to modify the underlying fortran code (hclust.f, from library mva) to use single precision rather than double precision. I changed "DOUBLE PRECISION" to "REAL" in the fortran code and saved the function as hclustsingle.f. It created a .so file without problem. The hope is, of course, that I'll use half as much memory. When I call hclustsingle, though, I get the same error as before (with the same amounts of memory), and the traceback says: 11: structure(.Internal(as.vector(x, "double")), Csingle = TRUE) 10: as.single.default(d) 9: as.single(d) ... So it looks as though changing to single can't help because the external function interface creates a double precision vector anyway. Is this correct? Thanks very much. Matthew Wiener Applied Computer Science and Mathematics Department Merck Research Labs Rahway, NJ 07065-0900 732-594-5303 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Reasonably Related Threads
- packages for extracting subtrees
- Error in randomForest.default(m, y, ...) : negative lengt h vectors are not allowed
- memory issue trying to solve too large a problem using hclust
- Getting 2 kinds of quotes inside a pasted string
- Re: Compiling R in 64-bit mode on AIX