# getnr¶

## Purpose¶

Computes number of rows to read per iteration for a program that reads data from a disk file in a loop.

## Format¶

nr = getnr(nsets, ncols)
Parameters: nsets (scalar) – estimate of the maximum number of duplicate copies of the data matrix read by readr() to be kept in memory during each iteration of the loop. ncols (scalar) – columns in the data file. nr (scalar) – number of rows readr() should read per iteration of the read loop.

## Remarks¶

If __row is greater than 0, nr will be set to __row.

If an insufficient memory error is encountered, change __rowfac to a number less than 1.0 (e.g. 0.75). The number of rows read will be reduced in size by this factor.

gauss.src

## Globals¶

__row, __rowfac, __maxvec