Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

AVAILABLE MEMORY

Status
Not open for further replies.

dudo

Chemical
Oct 12, 2007
2
ES
please, how can I get an information on the available memory for allocation? is there a specific FORTRAN command? thanks for your help
 
Replies continue below

Recommended for you

No specific command in Fortran for getting the memory available. This is more of an OS specific thing. Not all OSs have the command either. It depends on which OS you're using. You'll probably have to issue a system command to output the result to a file and then read the file in.
 
:-( unfortunatelly...

temporarily i solved it in this way:

DO WHILE (.NOT.ALLOCATED(MX))

IF (.NOT.ALLOCATED(MX)) ALLOCATE (MX(1:NG,1:NG,1:NG), STAT = ERR_ALLOC)

IF (ERR_ALLOC.NE.0) NG = NG - 50

END DO

WRITE (0, *) 'ALLOCATED ', NG**3 / 1000000, ' MEGABYTES.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor