Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Dynamic Allocation

$
0
0

Good morning,

I would like to know what is the reason for the following:

I am dynamically allocating some arrays in my code as:

allocate(dzgpbp(Nzbpg), STAT = AllocateStatus)
if (AllocateStatus /= 0) STOP "*** Not Enough Memory (Line 122 - Gridding Module): vector dzgpbp, if top packer = top modeling interval, and not limiting the geometric spacing ***"

Variable Nzbpg has already been defined previously.

I compile the program, and when I run it I get my message due to not enough memory.

However, if I comment out the line: !if (AllocateStatus /= 0) STOP "*** Not Enough Memory (Line 122 - Gridding Module): vector dzgpbp, if top packer = top modeling interval, and not limiting the geometric spacing ***"

I compile the program, and it successfully run, with STAT = 0.

It seems that the allocation-verifying statement is giving some troubles. What could be the reason? is there any other way I can implement to know whether the allocation was successful or not?

Thanks in advanced.

Juan

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>