memory calculation of variables in FORTRAN codes
Please tell me how to calculate the RAM required based on the dimensions to be used in a FORTRAN code
* For example, what memory in bytes will the dimension variable vx(21,21,61) occupy in a FORTRAN code on a Pentium machine.
* What is a 64 bit and 124 bit machine. How does it come into picture while calculating the memory requirements of a dimensioned variables say vx(21,21,61)
* How does one calculate the FLOPS of a computer. How many flops does PI, PII, PIII, PIV have.
Re: memory calculation of variables in FORTRAN cod
For x86, Digital Fortran complier:
integer --> 4 bytes
real(4) --> 4 bytes
real(8) --> 8 bytes
so, the mem size of vx is: 21x21x61x4 = 107,604 bytes.
But one can't take it for granted that 64-bit CPU will double the mem size of such data types. You have to check the documents of the compiler.
To calculate the FLOPS, you'd better use assembly language and try to use registers only which can minium the memcpy time. Alternative way is download CPU test software, such as Wintune, WinBench, WCPU...
|All times are GMT -4. The time now is 00:06.|