Determines the memory usage for a dense, in-core, numeric matrix of specified rows/columns.
howbig(nrow, ncol, representation = "dense", unit = .UNIT,
unit.prefix = .PREFIX, unit.names = .NAMES, ..., sparsity = 0.05,
type = "double", intsize = 4)howbig.par(nrow, ncol, cores = 1, par = "balanced", unit = .UNIT,
unit.prefix = .PREFIX, unit.names = .NAMES, ..., type = "double",
intsize = 4, ICTXT = 0, bldim = c(4, 4))
Number of (global) rows/columns of the matrix.
The kind of storage the object would be in, i.e. "dense" or "sparse".
string; the unit of storage, such as "MiB" or "MB", depending on prefix. Case is ignored.
string; the unit prefix, namely IEC or SI. Case is ignored.
string; control for whether the unit names should be printed out or their abbreviation should be used. Options are "long" and "short", respectively. Case is ignored.
Additional arguments.
The proportion of sparsity of the matrix if
representation="sparse"
"double" or "int"; the storage type of the data matrix. If you don't know the type, it is probably stored as a double, so the default value will suffice.
The size (in bytes) of an integer. Default is 4, but this is platform dependent.
The number of cores/processors
Type of data distribution. Choices are "dmat" or "balanced". The former is for pbdDMAT objects, the latter is the simple, locally load-balanced block partitioning.
BLACS context number; only used with howbig.par()
with
par="dmat"
.
Blocking factor for block-cyclically decomposed (dmat) data.
howbig()
returns a memuse
class object.
howbig.par()
returns a list of 2 elements, each of class
memuse
. One is the total memory usage, the other is the local memory
usage.
These functions provide the memory usage of an unallocated, dense, in-core,
numeric matrix. As the names suggest, howbig()
simply returns the
size (as a memuse
object), while howbig.par()
is the parallel,
distributed analogue. The latter returns the memory usage of a
distributed, object
# NOT RUN {
# size of a 1000x1000 matrix
howbig(1000, 1000)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab