Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Oct 12, 2007
Messages
2
Location
ES
please, how can I get an information on the available memory for allocation? is there a specific FORTRAN command? thanks for your help
 
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

Back
Top