CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

memory calculation of variables in FORTRAN codes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2002, 11:47
Default memory calculation of variables in FORTRAN codes
  #1
John
Guest
 
Posts: n/a
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.

Thanks John
  Reply With Quote

Old   April 8, 2002, 15:13
Default Re: memory calculation of variables in FORTRAN cod
  #2
Johnix
Guest
 
Posts: n/a
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...
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 01:52
Run-Time memory conifguration Error Graeme CFX 1 February 21, 2006 00:04
why Fortran? Matteo Manganelli Main CFD Forum 26 February 22, 2000 17:53
'C' or FORTRAN or 'C++' Yogesh Talekar Main CFD Forum 20 October 21, 1999 05:00
fortran codes in windows? Thorsten Main CFD Forum 0 September 24, 1998 08:51


All times are GMT -4. The time now is 08:54.