MEMORY_TEST is a FORTRAN90 program, using integer, single precision real and double precision real arithmetic, which declares and uses a sequence of larger and larger arrays, to see how big vectors can be in a program.
The program tries an increasing series of values of N, using powers of 2. You can set an internal value of N_LOG_MAX in order to limit the maximum value of N to be checked. This can be handy, since sometimes when you ask for a really big array, instead of failing immediately, the program simply bogs down in some sort of infinite muddle.
| Log(N) | N |
|---|---|
| 0 | 1 |
| 1 | 2 |
| 2 | 4 |
| 3 | 8 |
| 4 | 16 |
| 5 | 32 |
| 6 | 64 |
| 7 | 128 |
| 8 | 256 |
| 9 | 512 |
| 10 | 1,024 |
| 11 | 2,048 |
| 12 | 4,096 |
| 13 | 8,192 |
| 14 | 16,384 |
| 15 | 32,768 |
| 16 | 65,536 |
| 17 | 131,072 |
| 18 | 262,144 |
| 19 | 524,288 |
| 20 | 1,048,576 |
| 21 | 2,097,152 |
| 22 | 4,194,304 |
| 23 | 8,388,608 |
| 24 | 16,777,216 |
| 25 | 33,554,432 |
| 26 | 67,108,864 |
| 27 | 134,217,728 |
| 28 | 268,435,456 |
| 29 | 536,870,912 |
| 30 | 1,073,741,824 |
LINPACK_BENCH is a FORTRAN90 benchmark program which measures the time needed to factor and solve a linear system.
MACHINE is a FORTRAN90 library which can return various machine constants.
MATMUL is an executable FORTRAN90 program whichis an interactive matrix multiplication benchmark program.
MDBNCH is an executable FORTRAN77 program which is a benchmark code for a molecular dynamics calculation.
MEMORY_TEST is also available in a C++ version and a MATLAB version.
TIMER is a set of FORTRAN90 example programs that demonstrate how to compute CPU time or elapsed time.
You can go up one level to the FORTRAN90 source codes.